你这个是可枚举的分组统计 在不考虑有昨日点击率的情况下应该是 select datepart(h,time),count(*) from a group by datepart(h,time) where time between xxxx and xxxx