APPROX_COUNT_DISTINCT_EACH
The approximate count of distinct values per group in the time window.
Syntax
APPROX_COUNT_DISTINCT_EACH([MAX VALUES,] GROUP, VALUE)
Arguments
MAX VALUES:
The maximum number of groups. Groups beyond this amount will be discarded.
In some cases, discarding groups via MAX VALUES
may cause some data to be
discarded from groups that would otherwise have been kept.
MAX VALUES
is optional. If it is omitted there is, in effect, no limit.
GROUP:
The field in which to group the results.
VALUE:
The field to count distinct values relative to each group.
Returns
A number
Notes
NULLs are not counted.
Example
Data
Query
Count the number of distinct USER_IDs for each unique GROUP_ID:
Results:
Related Functions
Dialog
Last updated