个人技术分享

select substrB(sample_time ,1,13),count(1)

from dba_hist_active_sess_history se, dba_hist_sqltext sq

where se.sample_time >=

to_date('2024-03-15 00:00:00', 'YYYY-MM-DD HH24:MI:SS')

and se.sample_time

to_date('2024-03-18 08:00:00', 'YYYY-MM-DD HH24:MI:SS')

and SESSION_ID=1981

group by substrB(sample_time ,1,13)

order by 1;