Skip to content

Removes all duplicates and NULLs from the array without preserving the original order.

func.array_distinct( <array> )
func.array_distinct([1, 2, 2, 4, 3])
┌───────────────────────────────────────┐
│ func.array_distinct([1, 2, 2, 4, 3]) │
├───────────────────────────────────────┤
[1,2,4,3]
└───────────────────────────────────────┘
ARRAY_DISTINCT( <array> )
SELECT ARRAY_DISTINCT([1, 2, 2, 4, 3]);
┌─────────────────────────────────┐
│ array_distinct([1, 2, 2, 4, 3]) │
├─────────────────────────────────┤
│ [1,2,4,3] │
└─────────────────────────────────┘