SELECT concat( date_format( time, '%Y-%m-%d %H:' ) , floor( date_format( time, '%i' ) /10 ) ) AS c, count(1)
FROM table
WHERE time between "2019-07-08 00:00:00" and "2019-07-09 00:00:00"
GROUP BY c
order by c
意思为:每十分钟计算一次count值
本文发布于:2024-01-28 13:28:41,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17064197257741.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |