function(array[i]) evaluates to TRUE, if a function is provided.
If <function> is not provided, counts the number of elements in the array that evaluate to TRUE, equivalent to using x -> x.
To count the elements in an array without any conditions, use the ARRAY_LENGTH function instead.
Syntax
Parameters
Return Type
INTEGER
Examples
The example below searches through the array for any elements that are greater than 3. Only one number that matches this criteria is found, so the function returns1.
Rows: 1Execution time: 6.52ms
<function> provided in the ARRAY_COUNT function. This means the function will count all of the elements in the array that evaluate to TRUE. Below, this is the case for all values except FALSE and null:
Rows: 1Execution time: 6.16ms