Docs

v2.0

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(columns: ["_value"])

Parameters

columns

A list of columns on which to compute the mean. Defaults to ["_value"].

Data type: Array of strings

Examples

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

MEAN()


Bug Reports and Feedback

Thank you for being willing to help test InfluxDB v2.0 alpha! Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation.

Submit feedback in the InfluxData Community