出现这个结果:
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-10-09 21:36:04
出现这个结果:
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;