出现这个结果:
sql如下:
1 SELECT y ,sum(case jidu when 1 then sales else 0 end) as yijidu,sum(case jidu when 2 then sales else 0 end) as erjidu from a GROUP BY y;
时间: 2024-12-16 12:07:11
出现这个结果:
sql如下:
1 SELECT y ,sum(case jidu when 1 then sales else 0 end) as yijidu,sum(case jidu when 2 then sales else 0 end) as erjidu from a GROUP BY y;