MySQL如何查询一个月每天某个时间段的数据?

2025-03-08 18:44:39
推荐回答(1个)
回答1:

select date_format(atime,'%Y-%m-%d %H') as hour,count(*) as Count from z_alarm_false where atime >= '2019-1-25 00:00:00' and atime <= '2019-1-26 00:00:00' group by date_format(atime,'%Y-%m-%d %H');