- Overview
- Data types
- Commands
- Functions
- Overview
- Aggregate
- Conditional expression
- Conversion
- Date and time
- Numeric
- String
- Semi-structured data
- Window
- System
On this page
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]);