Returns the number of distinct elements in array_expr, optionally matching a specific input value.
Syntax
System Function
ARRAY_COUNT_DISTINCT ( array_expr [, scope_reference ] [, matching_expr ] )
Method-Style
array_expr.ARRAY_COUNT_DISTINCT ( [ scope_reference ] [, matching_expr ] )
- array_expr
-
An ARRAY expression, which is one of the following:
- A reference to an ARRAY column
- An ARRAY constructor expression
- A UDF expression
- A UDM expression
The element type of the array must be a numeric data type.
- scope_reference
- An ARRAY scope reference.
- matching_expr
- An expression to be matched by one or more elements in the array.