COUNT

This page describes the COUNT function in Lenses SQL.

COUNT(*) AS total

Returns the number of records returned by a query or the records in a group as a result of a GROUP BY statement.

Available in:

Processor (stateless)
Processors (stateful)
SQL Studio

Sample code:

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

Output:

{
  "value": {
    "COUNT": 1000
  }
}

Last updated

Was this helpful?