原始数据如下:
想要得到的结果:
sql语句:
select dw,count(distinct zy) as zycountfrom tablegroup by dw
select dw,count(distinct zy) as zycount
from table
group by dw