Oracle 19c

2014/05/distinct-listagg I wrote : Too bad the DISTINCT keyword was not implemented what a good surprise to see this working in Oracle 19 : 19C LISTAGG DISTINCT

distinct listagg

One limitation in listagg, you cannot use DISTINCT. Okay, there are plenty of distinct-capable listagg workarounds, but to get the real listagg working, it is a bit of an headache With one listagg SELECT DEPTNO, LISTAGG (JOB, ‘,’) WITHIN GROUP (ORDER BY JOB) JOBS FROM ( SELECT DISTINCT DEPTNO, JOB FROM EMP) GROUP BY DEPTNO;… Continue reading distinct listagg