If needed, coalesce can be used to replace null values before aggregation. If no not null value remains, the result of listagg is null. Listagg removes null values before aggregation 2 like most other aggregate functions. 1 Bind parameters are nevertheless well supported in practice.
0 The standard only allows character literals in -i.e. The must not contain window functions, aggregate functions or subqueries. The minimal syntax is: LISTAGG(, ) WITHIN GROUP(ORDER BY …) Listagg is an ordered set function, which require the within group clause to specify an order. When implementing electronic data interfaces, arrays and document types (JSON, XML) are advantageous as they offer type safety, or at least proper escaping. when aggregating numbers, dates, or strings that are known to not contain the separator. The safe use of listagg for electronic data interfaces is therefore limited to cases in which an unambiguous separator can be selected, e.g. Listagg does not apply any escaping: it is not generally possible to tell whether an occurrence of the separator in the result is an actual separator, or just part of a value. Listagg is typically used to denormalize rows into a string of comma-separated values (CSV) or other comparable formats suitable for human reading. The listagg function transforms values from a group of rows into a list of values that are delimited by a configurable separator.