SELECT TRUNC(t.starttime + 10 / 1440, 'HH24') +
FLOOR(TO_NUMBER(TO_CHAR(t.starttime + 10 / 1440, 'MI')) / 5) * 5 / 1440,
COUNT(*)
FROM t_magent_session t
WHERE t.starttime >= DATE '2017-12-01'
AND t.starttime < DATE '2017-12-2'
GROUP BY TRUNC(t.starttime + 10 / 1440, 'HH24') +
FLOOR(TO_NUMBER(TO_CHAR(t.starttime + 10 / 1440, 'MI')) / 5) * 5 / 1440;

posted on 2019-04-03 16:52  为了八千块  阅读(385)  评论(2编辑  收藏  举报