79252984

Date: 2024-12-04 23:19:51
Score: 1.5
Natty:
Report link

You need to use DISTINCT within LISTAGG

Fiddle

SELECT col0,
       LISTAGG(DISTINCT col1, ',') WITHIN GROUP (ORDER BY col1) AS col1
FROM test
GROUP BY col0;

Output

enter image description here

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
Posted by: samhita