LIST_AGG - Agregacja danych w jednym wierszu

select
kol1,
listagg(kol2, ' ') within group (order by kol2) lista
from tab
group by kol1

Tags: