Mysql-按小时统计数据

Mysql统计一天中每小时数据量sql如下

1
2
3
4
5
6
7
select created, count(created)
from (
select DATE_FORMAT( created ,'%Y-%m-%d %H') created
from shop_check_result
where created > '2018-10-08 00:00:00' and created < '2018-10-09 00:00:00'
) a
group by created;

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×