LAST_K

Returns the last K values per group.

Syntax

LAST_K([K], VALUE)

Arguments

K

Type: integer

Default: 1

(Optional) The number of values to return.

VALUE

Type: any

The field to return the last value(s) for.

Returns

Type: array

Returns an array of the last K values of the VALUE seen for each group.

Last updated