queries:functions:avg

avg

The avg function is an aggregation function and calculates the average of all values passed as a parameter and returns the result.

Return Type Number
Aggregates Yes
Flags Aggregation

Parameters

Parameters: avg(value)

Name Type Description
value Number The numbers which will be used for the mean.

Example Queries

Draws a number representing the average time (in seconds) spent on a page:

draw number using avg(ended - captured) from @views

IN THIS ARTICLE