LAST

This page describes the LAST function in Lenses SQL.

LAST(expr)

Returns the last item seen in a group.

Available in:

Processor (stateless)
Processors (stateful)
SQL Studio

Sample code:

USE `kafka`;
SELECT LAST(id) 
FROM orders-events

Output:

{
  "value": {
    "LAST": "9ce6a2c1-104f-49d8-818a-7fb632bb2f29"
  }
}

Last updated

Was this helpful?