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

  1. mean(column: "_value")

Parameters

column

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

*Data type: String*

Examples

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

Related articles