27,579
社区成员
发帖
与我相关
我的任务
分享
select 年,
sum(case when 月 in(1,2,3) then 数量 end) Q1,
sum(case when 月 in(4,5,6) then 数量 end) Q2,
sum(case when 月 in(7,8,9) then 数量 end) Q3,
sum(case when 月 in(110,11,12) then 数量 end) Q4
from t
group by 年