DAY_NUM | DAY_CHAR | DAY_COUNT | VISIT_CNT | VISIT_AVG | VISIT_PERCENT | PV_CNT | PV_AVG | PV_PERCENT |
---|---|---|---|---|---|---|---|---|
1 | 일 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2 | 월 | 2 | 7 | 3.5 | 63.64 | 43 | 21.5 | 72.88 |
3 | 화 | 1 | 1 | 1 | 9.09 | 1 | 1 | 1.69 |
4 | 수 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | 목 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6 | 금 | 1 | 3 | 3 | 27.27 | 15 | 15 | 25.42 |
7 | 토 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
WITH CONCENT_SUM(DAY_NUM, DAY_CHAR, DAY_COUNT, VISIT_CNT, VISIT_AVG, VISIT_PERCENT, PV_CNT, PV_AVG, PV_PERCENT) AS ( 테이블 내용 조회용 쿼리문 ) --WITH을 닫고 SELECT NVL(DAY_NUM,'TOTAL') AS DAY_NUM, DAY_CHAR, DAY_COUNT, VISIT_CNT, VISIT_AVG, VISIT_PERCENT, MAX(PV_CNT) AS PV_CNT, PV_AVG, PV_PERCENT FROM CONCENT_SUM GROUP BY ROLLUP((DAY_NUM, DAY_CHAR, DAY_COUNT, VISIT_CNT, VISIT_AVG, VISIT_PERCENT, PV_AVG, PV_PERCENT));