The following table lists the commonly used sequence functions provided by XQuery.
Sr.No | Name & Description |
---|---|
1 | count Function Counts the items in a sequence. |
2 | sum Function Returns the sum of the items in a sequence. |
3 | avg Function Returns the average of the items in a sequence. |
4 | min Function Returns the minimum valued item in a sequence. |
5 | max Function Returns the maximum valued item in a sequence. |
6 | distinct-values Function Returns select distinct items from a sequence. |
7 | subsequence Function Returns a subset of provided sequence. |
8 | insert-before Function Inserts an item in a sequence. |
9 | remove Function Removes an item from a sequence. |
10 | reverse Function Returns the reversed sequence. |
11 | index-of function Returns indexes as integers to indicate availability of an item within a sequence. |
12 | last Function Returns the last element of a sequence when used in predicate expression. |
13 | position Function Used in FLOWR expressions to get the position of an item in a sequence. |