Pages

Saturday, February 15, 2020

How to check how many switches occur per day in last 100 days?


set pagesize 200
Select
   to_char(trunc(first_time), 'Month') Month,
   to_char(trunc(first_time), 'Mon-DD-YYYY  :DY') Date_n_Day,
   count(*) Total_logswitches
from
   v$log_history
where
   trunc(first_time) > last_day(sysdate-100) +1
group by
   trunc(first_time)
order by 2 desc;

No comments:

Post a Comment