按每五分钟统计日志的数目 select floor(cast(logs.timestamp as int) / 60 / 5) as dt, count(logs.id) from ( select
按每五分钟统计日志的数目
select
floor(cast(logs.timestamp as int) / 60 / 5) as dt,
count(logs.id)
from (
select
logs.id,
logs.timestamp
from public.logs as logs
order by logs.id asc
limit 10) as logs
group by floor(cast(logs.timestamp as int) / 60 / 5);
--结束END--
本文标题: sql按任意时间段分组统计
本文链接: https://www.lsjlt.com/news/4653.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0