SELECT CAST(DateTimeColumn AS DATE) AS DateOnly, COUNT(*) AS Count
FROM TableName
GROUP BY CAST(DateTimeColumn AS DATE)
年度统计
SELECT Year(DateTime) AS TheYear, COUNT(*) AS Count
FROM m_Testheaders
GROUP BY Year(DateTime)
order by Year(DateTime) desc