Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

SUM

This page describes the SUM function in Lenses SQL.

SUM(numExpr)

Returns the sum of all the values, in the expression. It can be used with numeric input only. Null values are ignored.

Available in:

Processor (stateless)
Processors (stateful)
SQL Studio

✓

✓

✓

Sample code:

USE `kafka`;
SELECT SUM(total) 
FROM orders-events

Output:

{
  "value": {
    "SUM": "163053.270000000000000000"
  }
}

Last updated

Was this helpful?