sql练习题-case/group by

代码:

select FName,
sum( case Score when N'胜' then 1 else 0 end ) as N'胜',
sum( case Score when N'负' then 1 else 0 end ) as N'负'
from T_Scores
group by FName	
题目/结果:


-----------------------------------------------------------------

题目/代码:case, ABS() 





猜你喜欢

转载自blog.csdn.net/hnanxihotmail/article/details/80210782