LAST_K_EACH
Returns the last K values per given group.
Syntax
LAST_K_EACH([MAX_VALUES,] K, GROUP, VALUE)Arguments
MAX_VALUES
MAX_VALUESType:
Default: 2,147,483,647
(Optional) The maximum number of entries that are counted. If omitted, there is effectively no limit.
K
KType: integer
The number of entries to return.
GROUP
GROUPType: any
The field to group by.
VALUE
VALUEType: any
The field to get the last value(s) of.
Returns
Type: array
Returns an array of key-value pairs where each GROUP is matched to an array of the last K values of VALUE seen for that group.
Last updated
