the following table lists the commonly used sequence functions provided by xquery.
sr.no | name & description |
---|---|
1 |
counts the items in a sequence. |
2 |
returns the sum of the items in a sequence. |
3 |
returns the average of the items in a sequence. |
4 |
returns the minimum valued item in a sequence. |
5 |
returns the maximum valued item in a sequence. |
6 |
distinct-values($seq as item()*) returns select distinct items from a sequence. |
7 |
subsequence($seq as item()*, $startingloc as xs:double, $length as xs:double) returns a subset of provided sequence. |
8 |
insert-before($seq as item()*, $position as xs:integer, $inserts as item()*) inserts an item in a sequence. |
9 |
remove($seq as item()*, $position as xs:integer) removes an item from a sequence. |
10 |
returns the reversed sequence. |
11 |
index-of($seq as anyatomictype()*, $target as anyatomictype()) returns indexes as integers to indicate availability of an item within a sequence. |
12 |
returns the last element of a sequence when used in predicate expression. |
13 |
used in flowr expressions to get the position of an item in a sequence. |