WITH TEMP AS (
SELECT 'F' AS GRP, 1 AS NUM FROM DUAL UNION ALL
SELECT 'X' AS GRP, 2 AS NUM FROM DUAL UNION ALL
SELECT 'A' AS GRP, 3 AS NUM FROM DUAL UNION ALL
SELECT 'A' AS GRP, 4 AS NUM FROM DUAL UNION ALL
SELECT 'C' AS GRP, 5 AS NUM FROM DUAL UNION ALL
SELECT 'C' AS GRP, 6 AS NUM FROM DUAL UNION ALL
SELECT 'D' AS GRP, 7 AS NUM FROM DUAL UNION ALL
SELECT 'E' AS GRP, 8 AS NUM FROM DUAL
)
SELECT GRP
, NUM
FROM TEMP
GRP NUM 순서
F 1 1
X 2 2
A 3 3
A 4 3
C 5 4
C 6 4
D 7 5
E 8 6
제가 원하는 순서는 위에서 보시는 대로
NUM이라는 정렬 순서대로 나오되 DENSE_RANK처럼 동일 그룹은
같은 순번으로 나오는건데요
될거 같기도 하면서 잘 안되네요.. 도와주세요