SELECT CONVERT(VARCHAR(10), dtCreateTime, 120) AS dtStatisticsCreateDate, COUNT(1) AS nStatisticsCount
FROM Web_Statistics
WHERE datepart(hh,dtCreateTime)>=10 AND datepart(hh,dtCreateTime)<11
sql 查询一段时间内某个时间点数据
原文:http://www.cnblogs.com/ghelement/p/4949491.html