Result structure
The result structure of an AQL query in its raw form is a 2-dimensional table, conceptually similar to the tabular projection generated by an SQL query. Formally, it may be thought of as having the type Array<Array<Any>>, where Any is understood as the superclass of all object types, including primitive and built-in types, or the NULL value in the case where the data item is missing or unknown.
In practical use, AQL queries will normally be executed through a library or service API, which is likely to provide an 'annotated' result structure, i.e. a data structure that includes meta-data such as column descriptors, thus enabling efficient result processing. Such annotated results are not formally defined by this specification, and are considered an artefact of the relevant API or service definition.
An example of such an extended structure is the 'Result set' used in openEHR, described by the openEHR Abstract Platform Query Service. A concrete expression for use with the openEHR REST Query API includes this structure, mapped to HTTP and JSON structures.