APPROX_COUNT_DISTINCT
The approximate number of distinct values in the time window.
Use this function instead of COUNT_DISTINCT
to improve performance. This should be used when there are relatively few (under 1 million) rows, and where the total number of distinct values is high.
Syntax
APPROX_COUNT_DISTINCT(VALUE)
Arguments
VALUE:
Can be of any type
Returns
An integer.
Notes
Duplicate rows are not counted. NULLs are not counted.
Example
Data
Query
Count the number of distinct entries for each unique entry in a field:
Results
Related Functions
COUNT_DISTINCT APPROX_COUNT_DISTINCT_EACH
Dialog
Last updated