select T2.username,count(T2.username)
FROM gv$active_session_history t
,dba_users t2
WHERE
t.SAMPLE_TIME between to_timestamp('02/22/2014 20:30:00','MM/DD/YYYY HH24:MI:SS') and
to_timestamp('02/22/2014 20:35:00','MM/DD/YYYY HH24:MI:SS')
and t.user_id = t2.user_id
group by T2.username
order by count(T2.username)
;
FROM gv$active_session_history t
,dba_users t2
WHERE
t.SAMPLE_TIME between to_timestamp('02/22/2014 20:30:00','MM/DD/YYYY HH24:MI:SS') and
to_timestamp('02/22/2014 20:35:00','MM/DD/YYYY HH24:MI:SS')
and t.user_id = t2.user_id
group by T2.username
order by count(T2.username)
;
No comments:
Post a Comment