8.4.6. Main query text sections
A query text can be described by the following rule:
"><Query Text>
<Query description> [<Merge queries>] [<Order results>] [AUTOORDER] [<Totals description>]
As can be seen from this rule, the query text consists of several parts or sections:
- <Query description>. It is the only required section in the query text. In many cases, it is enough to specify only this section. The section defines query data sources, selection fields, groupings, and so on. This section is described by a whole set of rules and reviewed below.
- <Merge queries>. The query language allows merging multiple query results.
- <Order results>. In this section, you can define conditions for ordering strings in a query result.
- AUTOORDER. In this section, you can enable the mode to order strings in a query result automatically.
- <Totals description>. In this section, you can specify which totals must be calculated in a query.