SQL统计双休日答:select Inspect_name,A=sum(A), B=sum(B),双休日=sum(case when 双休日 >= 2 then 1 else 0 end)from (select weekly,Inspect_name,A=sum(A), B=sum(B),双休日=sum(case when 双休日>119 then 1 else 0 end)from (select weekly, Inspect_name, vdatetime2,sum(case when ...