array_distinct()

Removes all duplicates and NULLs from a list. Does not preserve the original order

Alias of list_distinct()

Arguments & returns

array_distinct(list)

Scalar
Overload link list Returns
#01 ANY[] ANY[]

Example

array_distinct example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  list_distinct([1, 1, NULL, -3, 1, 5]);