sum() function
The sum()
function computes the sum of non-null records in a specified column.
Function type: Aggregate
Output data type: Integer, UInteger, or Float (inherited from column type)
sum(column: "_value")
Parameters
column
The column on which to operate.
Defaults to "_value"
.
Data type: String
Examples
from(bucket: "example-bucket")
|> range(start: -5m)
|> filter(fn: (r) =>
r._measurement == "cpu" and
r._field == "usage_system"
)
|> sum()
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.