需求:统计每十分钟访问报表的人数

现在有个需求:

要求统计没十分钟访问报表的人数.



统计结果如:



最终sql:

select
trunc(oper_time, 'dd') +
(floor(to_char(oper_time, 'sssss') / 600)) / 144 time2,count(*)
from tb_log_report where oper_time>trunc(sysdate-21)
group by trunc(oper_time, 'dd') +
(floor(to_char(oper_time, 'sssss') / 600)) / 144 ;