Documentation

mean() function

The mean() function computes the mean or average of non-null records in the input table.

Function type: Aggregate
Output data type: Float

mean(column: "_value")

Parameters

column

The column to use to compute the mean. Defaults to "_value".

Data type: String

Examples

from(bucket:"example-bucket")
  |> filter(fn: (r) =>
    r._measurement == "mem" and
    r._field == "used_percent")
  |> range(start:-12h)
  |> window(every:10m)
  |> mean()

New! 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: