select year(time) 年,month(time) 月,day(time) 日,sum(num) from tablegroup by year(time),month(time),day(time)或者select convert(char(8),time,112) dt,sum(num) from tablegroup by convert(char(8),time,112)
本文共 256 字,大约阅读时间需要 1 分钟。
select year(time) 年,month(time) 月,day(time) 日,sum(num) from tablegroup by year(time),month(time),day(time)或者select convert(char(8),time,112) dt,sum(num) from tablegroup by convert(char(8),time,112)
转载于:https://www.cnblogs.com/wu-fm/p/8442040.html