Skip to main content

avg

Introduced in: v1.1.0 Calculates the arithmetic mean. Syntax
Arguments Returned value Returns the arithmetic mean. For a numeric x the result is a Float64, and NaN if x is empty. For a date, time or interval x the result keeps the type of x: the mean is rounded to the nearest representable value, and an empty x gives the zero value of that type. Float64 or Date or Date32 or DateTime or DateTime64(P) or Time or Time64(P) or Interval Examples Basic usage
Query
Response
Empty table returns NaN
Query
Response
Average of an interval
Query
Response
Last modified on September 25, 2026