Group by 后 细分数据
select cartypesn,
sum(case w2_onschedule_sort when 10 then 1 else 0 end) 提前入库,
sum(case w2_onschedule_sort when 20 then 1 else 0 end) 计划内入库,
sum(case when w2_onschedule_sort in (30,40) then 1 else 0 end) 延迟入库
from w2summary_day_h_d m group by cartypesn;
有没有办法将 提前入库、 计划内入库、延迟入库
在进行细分 得到 A有多少 B有多少 ?
大虾 帮我看看 急!!!!!!!