FIRST_EACH
Returns an array of first values in the time window, grouped by a sub-key. The statement is limited to a maximum number of values.
Syntax
FIRST_EACH([MAX VALUES, ]GROUP, VALUE)
Arguments
MAX VALUES:
Limit of key\value elements in the output (Default: 2,147,483,647).
When MAX VALUES
is omitted, the limit is simply set to the default value.
GROUP:
Field to aggregate by
VALUE:
Field to sub-aggregate by
Returns
For each key aggregated in the query, the function returns an array or FIRST
values of key\value pairs.
Notes
This function is non-deterministic.
AVAILABLE IN
Output Type Availablity Aggregated Outputs NO Explicit Lookup Table YES Inline Joins\Lookups NO
Example
Data
Query:
For each GROUP, find when the each USER first appeared.
Results:
Related Functions
FIRST FIRST_ARRAY FIRST_TIME_SERIES
Dialog
Last updated