dedup

Removes duplicate values from an array.

Syntax

dedup( <array_expr> )

Arguments

<array_expr> must be an array.

Returns

Returns an array. The first occurrence of each value is kept.

Examples

SELECT dedup([1, 2, 2, 3, 1]);