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;