TAKE LAST

The TAKE LAST aggregation function returns the last element of the input stream.

For example, you can pick the youngest person among a stream of persons.

See Also
RESULT SET
AGGREGATE
GROUP BY
Choose Where to Apply Aggregations
Parameter Description
Filter expressionAn expression to keep some elements only. It is useful to process the aggregation on a subpart of your input stream.
Expression Extracts the numerical value of each element of the input stream. For example, person.income if your input is a stream of persons.

Default: identity function.

Sorter Sorts elements before taking the last. For more information, see Sorter Criteria Parameters.