select datepart(year,date),datepart(month,date),sum(需要合计的数据项) from 表
group by datepart(year,date),datepart(month,date) order by datepart(year,date),datepart(month,date)
转载于:https://blog.51cto.com/mikehopes/500641
select datepart(year,date),datepart(month,date),sum(需要合计的数据项) from 表
group by datepart(year,date),datepart(month,date) order by datepart(year,date),datepart(month,date)
转载于:https://blog.51cto.com/mikehopes/500641