Mean
Mean( arrayOrSet )
Mean( arrayOrSet )
Mean( arrayOrSet )
Mean( arrayOrSet )
mean( arrayOrSet )
Mean( arrayOrSet )
Description
The Mean
function returns the average value of the items in
arrayOrSet
, which is an Array, Page, or Set. The
mean is calculated by dividing the sum of the arrayOrSet
's values by
the count of the arrayOrSet
's values.
The run time of For query "width" errors, the underlying set or page involves more than
100K items. This can happen when using a set function, such as
For example, instead of:
use:
This does mean that if the entire set must be evaluated to arrive at the
correct result, you would have to page through the For query timeout errors, you may specify a larger query timeout via the driver that you are using. |
Returns
A Number representing the average value of all items in
arrayOrSet
.
Examples
The following query returns the average of the items in the provided array:
DoubleV(5.5)
5.5
5.5
5.5
5.5
5.5
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!