Home >>XQuery Tutorial >XQuery Sequence Functions

XQuery Sequence Functions

XQuery Sequence Functions

Let's check XQuery 's list of widely used sequence functions:

Sr No Name Description
1. count($seq as item()*) It is used for sequence counting of items.
2. sum($seq as item()*) The sum of the items in a list is returned using it.
3. avg($seq as item()*) It is used to return the items average in a sequence.
4. min($seq as item()*) It is used in a sequence to return the minimally valued item.
5. max($seq as item()*) It is used to return a sequence of the highest valued item.
6. distinct-values($seq as item()*) It returns separate items selected from a sequence.
7. subsequence($seq as item()*, $startingloc as xs:double, $length as xs:double) It is used for returning a subset of the sequence given.
8. insert-before($seq as item()*, $position as xs:integer, $inserts as item()*) Used for inserting an item into a sequence.
9. remove($seq as item()*, $position as xs:integer) Deleting an item from a sequence is allowed.
10. reverse($seq as item()*) It is used to return the reversed sequence.
11. index-of($seq as anyatomictype()*, $target as anyatomictype()) It returns indexes as integer showing an item 's availability within a sequence.

No Sidebar ads