1,216
社区成员
发帖
与我相关
我的任务
分享
select 日期,单号,物品名称,
count(1) as 移仓次数,
count(case when 搬运工 = '李上水' then 1 else null end ) as 李上水移仓次数,
count(case when 搬运工 = '王金贵' then 1 else null end ) as 王金贵移仓次数,
count(case when 搬运工 = '张磊' then 1 else null end ) as 张磊移仓次数
from 表名
group by 日期,单号,物品名称