sql group by hour 按小时分组统计

 

Time字段以小时分组统计

select datepart(hour,time) hour,count(1) count from table
where
Similarity<75
group by datepart(hour,time)
order by count desc

 

From:https://www.cnblogs.com/xuejianxiyang/p/11202931.html

转载于:https://www.cnblogs.com/xuejianxiyang/p/11202931.html

你可能感兴趣的:(sql group by hour 按小时分组统计)