Skip to content

Last

filter category: filter no `||` resultSize: 1

Passes through only the records with the highest ordering value within each group.

Last is the mirror of First: same grouping/ordering shape, but the record with the largest collective value across the ordering fields is the one let through.

Parameters

1group Mandatory — accepts: array of fields (@table:field notation)

Defines how the source records must be grouped.

2order Mandatory — accepts: array of fields (@table:field notation)

Defines how to select the last value within each group. The record with the highest collective value across these fields is the one passed through.

Requires

  • All referenced fields must exist on the source table.

Examples

Last([:person_id],[:move_date])

See also

First