你可以按年月来汇总
select left(CONVERT(varchar(10),[date],112),6) as 月份,sum(num) as 总次数
from table1
group by left(CONVERT(varchar(10),[date],112),6)