Application Development → SQL
The LISTAGG aggregate function now supports duplicate elimination by using the new DISTINCT keyword.
Business Benefit: The LISTAGG aggregate function orders the rows for each group in a query according to the ORDER BY expression and then concatenates the values into a single string. You can remove duplicate values from the specified expression before concatenation into a single string using the new DISTINCT keyword. This removes the need to create complex query processing to find the distinct values before using the aggregate LISTAGG function. Use the DISTINCT option to remove duplicate values within the LISTAGG function. The result is simpler faster more efficient SQL.