Documentation

experimental.sum() function

The experimental.sum() function is subject to change at any time. By using this function, you accept the risks of experimental functions.

The experimental.sum() function computes the sum of non-null values in the _value column for each input table.

Function type: Aggregate
Output data type: Integer, UInteger, or Float (inherited from column type)

import "experimental"

experimental.sum()

Examples

import "experimental"

from(bucket: "example-bucket")
  |> range(start: -5m)
  |> filter(fn: (r) =>
    r._measurement == "example-measurement" and
    r._field == "example-field"
  )
  |> experimental.sum()

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: