This page describes the BOTTOMK function in Lenses SQL.
BOTTOMK(numExpr, N)Returns the last K lowest ranked values. The ranking is based on how many times a value has been seen.
Available in:
✓
Sample code:
USE `kafka`;
SELECT BOTTOMK(total)
FROM orders-eventsOutput:
{
"value": {
"BOTTOMK": [
10.14
]
}
}