조회
select '', '', day1, day2, day3, count(schoolno)-sum(value1) value1, sum(value1) value2, sum(extend_cnt) value3 from ( select to_char(d.usestart,'YYYY') day1, to_char(d.usestart,'MM') day2, to_char(d.usestart,'DD') day3, d.schoolno schoolno, to_char(usestart,'DD'), to_char(regtime,'DD'), decode(to_char(usestart,'DD'),to_char(regtime,'DD'),0,1) value1, extend_cnt from seatcode c, seatbookingview ..