Grouping according to equality of values
The second method of a grouping in XQuery is closer to the relational method to the extent that the group definition is…
Aggregation functions
In XQuery the aggregation is based on the formulation in OQL, whereby the "classic" aggregation functions fn:sum(), fn:avg(), fn:count(), fn:min()…
Grouping via several attributes
If facts are to be designated according to different criteria, a grouping via several attributes is required. Analogous to the relational or…
Group filtering and sorting
The check for existence of an item via which aggregation shall be made in order to eliminate empty grouping combinations essentially corresponds to the construct of…
Multiple grouping
The principle of the multiple grouping is applied if within a single query the original data stock shall be grouped multiple times according to different criteria. Multiple…
Nested grouping
XQuery is provided with an extremely mighty feature based on the principle of the application of aggregation functions on sequences, namely the ability of the nesting with…
The XQuery data model
The XQuery data model has been introduced in order to be able to specify precisely the semantics of XQuery. The data model is described in the following. An own data model is…
Sequences
Sequences are the central data structure in XQuery. In this section, the structure of sequences is first introduced. Then functions and operators are explained.
The structure of…
Functions and operations on sequences
Since each expression in XQuery results in a sequence, consequently also all functions in XQuery are functions on sequences. In this section, only functions are…
Changes in sequences
We have already introduced the concatenation of sequences with the comma operator. With this operator, also single items can be added to a sequence:
let $seq := (1, 2, 3) …