Skip to main content

ARRAY_UNIQUE

Counts unique elements in the array (except NULL).

Syntax

ARRAY_UNIQUE( <array> )

Examples

SELECT ARRAY_UNIQUE([1, 2, 3, 3, 4]);

┌───────────────────────────────┐
│ array_unique([1, 2, 3, 3, 4])
├───────────────────────────────┤
4
└───────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today