Hide
Modify the relevant part of the specification as follows (deletions are striked out, insertions are in italics or indented). To be discussed whether the fifth alternative (the green text) can be abolished and remove example 7. TC agrees to abolish it on 2021-06-10.
The aggregate transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set.
In the following, P is a path made up of navigation properties, complex properties, and complex collection properties.
An aggregate expression may be:
- an aggregatable expression on the input set with a specified aggregation method,
- an aggregatable property that can be reached via a path P
consisting of a sequence of navigation properties, complex properties and complex collection properties, with a specified aggregation method,
- a custom aggregate that can be reached via a path P
consisting of a sequence of navigation properties, complex properties and complex collection properties,
- any of the above, followed by a from expression,
any of the above, enclosed in parentheses and prefixed with a navigation path to related entities, which serve as input set for the enclosed aggregate expression,
- $count, which is a shortcut for the expression 1 with sum
If P is present, it must be well-defined for all instances in the input set. Let Q be the portion of P up to and including the last navigation property, if any, and let R be the remainder, if any, of P that contains no navigation properties, such that P equals the concatenated path Q/R. The aggregate transformation considers each entity reached via the path Q exactly once. To this end
- if Q is non-empty, let E be the set of distinct entities reached via Q starting from the input set
- if Q is empty, let E be the input set (which may contain multiple instances with the same value).
Then, if R is empty, the aggregated value is computed for all instances in E, otherwise the aggregated value is computed for all instances addressed via R starting from E.
If no paths are present, the aggregated value is computed for all instances in the input set.
Any aggregate expression that specifies an aggregation method MUST define an alias for the resulting aggregated value. The resulting instance contains one dynamic property per parameter representing the aggregated value across all instances within the input set. If paths are present, the corresponding navigation properties are implicitly expanded to make the properties part of the result representation.
The properties of P do not appear in the result (cf. example 59, with P = Q = Sales and R = empty).
Show
Modify the relevant part of the specification as follows (deletions are striked out, insertions are in italics or indented). To be discussed whether the fifth alternative (the green text) can be abolished and remove example 7. TC agrees to abolish it on 2021-06-10.
The aggregate transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set.
In the following, P is a path made up of navigation properties, complex properties, and complex collection properties.
An aggregate expression may be:
an aggregatable expression on the input set with a specified aggregation method,
an aggregatable property that can be reached via a path P consisting of a sequence of navigation properties, complex properties and complex collection properties, with a specified aggregation method,
a custom aggregate that can be reached via a path P consisting of a sequence of navigation properties, complex properties and complex collection properties,
any of the above, followed by a from expression,
any of the above, enclosed in parentheses and prefixed with a navigation path to related entities, which serve as input set for the enclosed aggregate expression,
$count, which is a shortcut for the expression 1 with sum
If P is present, it must be well-defined for all instances in the input set. Let Q be the portion of P up to and including the last navigation property, if any, and let R be the remainder, if any, of P that contains no navigation properties, such that P equals the concatenated path Q/R. The aggregate transformation considers each entity reached via the path Q exactly once. To this end
if Q is non-empty, let E be the set of distinct entities reached via Q starting from the input set
if Q is empty, let E be the input set (which may contain multiple instances with the same value).
Then, if R is empty, the aggregated value is computed for all instances in E, otherwise the aggregated value is computed for all instances addressed via R starting from E.
If no paths are present, the aggregated value is computed for all instances in the input set.
Any aggregate expression that specifies an aggregation method MUST define an alias for the resulting aggregated value. The resulting instance contains one dynamic property per parameter representing the aggregated value across all instances within the input set . If paths are present, the corresponding navigation properties are implicitly expanded to make the properties part of the result representation.
The properties of P do not appear in the result (cf. example 59, with P = Q = Sales and R = empty).