查询统计图表的日期和数量,使用group by 分组查询:
Select CONVERT(nvarchar(11),UpdateTime,120),count(1) from Log where UpdateTime >‘2020-05-01‘ and UpdateTime < ‘2020-05-20‘ group by CONVERT(nvarchar(11),UpdateTime,120) order by CONVERT(nvarchar(11),UpdateTime,120) asc
2024-01-10 20:49:40
查询统计图表的日期和数量,使用group by 分组查询:
Select CONVERT(nvarchar(11),UpdateTime,120),count(1) from Log where UpdateTime >‘2020-05-01‘ and UpdateTime < ‘2020-05-20‘ group by CONVERT(nvarchar(11),UpdateTime,120) order by CONVERT(nvarchar(11),UpdateTime,120) asc