Using AS expressions to calculate derived attributes

EQL statements typically use expressions to compute one or more derived attributes.

Each aggregation operation can declare an arbitrary set of named expressions, sometimes referred to as derived attributes, using SELECT AS syntax. These expressions represent aggregate analytic functions that are computed for each aggregated record in the statement result.

Important: Derived attribute names must be NCName-compliant. They cannot contain spaces or special characters. For example, the following statement would not be valid:
RETURN price AS SELECT AVG(Price) AS "Average Price"
The space would have to be removed:
RETURN price AS SELECT AVG(Price) AS AveragePrice