Return average of a sequence of numbers.
The following construct(s) refer to this construct:
fn:avg(sequence $sequence) => double
This aggregate function returns the average of the numeric values of the
nodes of $sequence
. The nodes of the sequence must all
evaluate to numbers. If a node evaluates to the empty sequence it is
discarded.
$sequence |
sequence of nodes |
---|
let $a := (17, 23, 11) return avg($a)