You need to use DISTINCT within LISTAGG
DISTINCT
LISTAGG
Fiddle
SELECT col0, LISTAGG(DISTINCT col1, ',') WITHIN GROUP (ORDER BY col1) AS col1 FROM test GROUP BY col0;
Output