구분자로 입력된 값을 행으로 분류후 통계 내기
WITH RTOTAL AS ( SELECT MAIN_SEQ, COUNT(MAIN_SEQ) AS TOT FROM S_REPLY GROUP BY MAIN_SEQ ) SELECT M.MAIN_SEQ, M.SUB_SEQ, M.IKEY, M.INAME, M.GNAME, NVL(R.CNT, 0) AS CNT, NVL(T.TOT, 0) AS TOT, ROUND((NVL(R.CNT, 0)/NVL(T.TOT, 0))*100, 1) AS RND, M.SORT FROM S_QUEST_MULTI M ,( SELECT IDX, QIDX, EX_SPLIT, COUNT(EX_SPLIT) AS CNT FROM ( SELECT IDX, QIDX, MEMBER_ID, REGEXP_SUBSTR(R.EX, '[^\;]+', 1, L.LEV..
더보기