Oracle

게시글 보기
작성자 유건데이타 등록일 2021-07-21
제목 로그 스위치 현황 파악


select to_char(first_time,'MM/DD') ||'|'||
to_char(count(first_time)) ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'00',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'01',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'02',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'03',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'04',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'05',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'06',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'07',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'08',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'09',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'10',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'11',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'12',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'13',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'14',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'15',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'16',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'17',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'18',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'19',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'20',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'21',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'22',1,0)),'99') ||'|'||
to_char(sum(decode(to_char(first_time,'hh24'),'23',1,0)),'99') ||'|'
as log_history
from v$log_history
group by to_char(first_time,'MM/DD')
order by to_char(first_time,'MM/DD')
/
Comment
등록된 코멘트가 없습니다.