7,714
社区成员
发帖
与我相关
我的任务
分享
select pod,
sum(iif( cntrtype=2,1,0)) as [20],
sum(iif( cntrtype=2,0,1)) as [40]
from sheet1
group by pod
union all
select 'Total' as pod,
sum(iif( cntrtype=2,1,0)) as [20],
sum(iif( cntrtype=2,0,1)) as [40]
from sheet1
select pod,
sum(iif( cntrtype=2,1,0)) as [20],
sum(iif( cntrtype=2,0,1)) as [40]
from sheet1
group by pod
select pod,
sum(iif( cntrtype=20,1,0)) as [20],
sum(iif( cntrtype=40,1,0)) as [40]
from (SELECT pod, IIf(teu=2,40,20) AS cntrtype, teu
FROM sheet1 )
group by pod
select pod,
sum(iif( cntrtype=20,1,0)) as [20],
sum(iif( cntrtype=40,1,0)) as [40]
from A
group by pod