Skip to main content
Version: Next

mean

Computes the mean of all grouped values.

mean(xs:list) -> float

Description

The mean function returns the average of all numeric values in xs.

xs: list

The values to average.

Examples

Compute the mean value

from [
  {x: 1},
  {x: 2},
  {x: 3},
]
summarize avg=mean(x)
{avg: 2.0}

See Also

median, sum