Mssql问题:提取一张表的一个字段,根据日期,按照时间查询。

2025-05-06 16:47:32
推荐回答(1个)
回答1:

你这个是可枚举的分组统计 在不考虑有昨日点击率的情况下应该是

select datepart(h,time),count(*) from a
group by datepart(h,time)
where time between xxxx and xxxx