728x90
반응형

select '월별접수건수' as 일자,  count(decode(to_char(reg_dt, 'mm'), 01, 1)) as "1월",  count(decode(to_char(reg_dt, 'mm'), 02, 1)) as "2월",  count(decode(to_char(reg_dt, 'mm'), 03, 1)) as "3월",  count(decode(to_char(reg_dt, 'mm'), 04, 1)) as "4월",  count(decode(to_char(reg_dt, 'mm'), 05, 1)) as "5월",  count(decode(to_char(reg_dt, 'mm'), 06, 1)) as "6월",  count(decode(to_char(reg_dt, 'mm'), 07, 1)) as "7월",  count(decode(to_char(reg_dt, 'mm'), 08, 1)) as "8월",  count(decode(to_char(reg_dt, 'mm'), 09, 1)) as "9월",  count(decode(to_char(reg_dt, 'mm'), 10, 1)) as "10월",  count(decode(to_char(reg_dt, 'mm'), 11, 1)) as "11월",  count(decode(to_char(reg_dt, 'mm'), 12, 1)) as "12월" From crss_status where reg_dt between to_date(20030101, 'yyyymmdd') and to_date(20030101, 'yyyymmdd')+365

728x90
반응형
블로그 이미지

nineDeveloper

안녕하세요 현직 개발자 입니다 ~ 빠르게 변화하는 세상에 뒤쳐지지 않도록 우리모두 열심히 공부합시다 ~! 개발공부는 넘나 재미있는 것~!

,