SELECT '테스트' AS TEST, 'DATA_1' AS DATA FROM dual
UNION
SELECT '테스트' AS TEST, 'DATA_2' AS DATA FROM dual
UNION
SELECT '테스트' AS TEST, 'DATA_3' AS DATA FROM dual
2. 한 줄로 출력
SELECT
LISTAGG(DATA, ', ') WITHIN GROUP(ORDER BY TEST) AS MERGE_DATA
FROM (
SELECT '테스트' AS TEST, 'DATA_1' AS DATA FROM dual
UNION
SELECT '테스트' AS TEST, 'DATA_2' AS DATA FROM dual
UNION
SELECT '테스트' AS TEST, 'DATA_3' AS DATA FROM dual
);