select num
, substr(max(sys_connect_by_path(''''||data||'''', ', ')), 2) as data
from (
select num
, data
, row_number() over(partition by num order by data) rn
from table
)
start with rn = 1
connect by prior num = num and prior rn = rn - 1
group by num






Posted by 하이안
,