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

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.