Version 8.2.2
 —  XQuery 4 Reference Guide  —

fn:sum

Return sum of a sequence of numbers.


Syntax

fn:sum(sequence $sequence) => double

Top of page

Description

This aggregate function returns the sum of all numeric values in a sequence. If the argument is an empty sequence, the function returns the numerical value 0.

Top of page

Argument

$sequence

sequence of numerical values

Top of page

Examples

Top of page