select whbmbh ,zt,1 as tjsl from fyxx group by zt,whbmbh select whbmbh,sum(case zt when '有效' then 1 end) as yxsl,sum(case zt when '暂缓' then 1 end )as zhsl,sum(case zt when '未知' then 1 end) as wzsl,sum(case zt when '我租' then 1 end) as wzsl,sum(case zt…