2条回答 默认 最新
- 弓长张_ 2017-04-10 15:15关注
select year, sum(case month when 1 then amount else 0 end) as m1, sum(case month when 2 then amount else 0 end) as m2, sum(case month when 3 then amount else 0 end) as m3, sum(case month when 4 then amount else 0 end) as m4
from table group by year本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报