如何使用纪元和mysql每小时进行计数?

| 如何在24小时内的每个小时之间创建一个计数行? 我有这样的桌子
[ID] [Time(epoch time)]
谢谢
已邀请:
我希望我理解你的问题
select from_unixtime(visittime,\'%H\') as h,count(*) as total
from table
where from_unixtime(visittime) >= now() - interval 1 day
group by h

要回复问题请先登录注册