Examples 60, 61: Missing aggregation method for $count on related entities

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • V4.0_CSD04
    • Affects Version/s: V4.0_CS02
    • Component/s: Data Aggregation
    • None
    • Environment:

      Proposed

    • Hide

      Ex 60: Replace

      GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count as SalesCount))

      with

      GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count with sum as SalesCount))

      Ex 61: Replace

      GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count as SalesCount,Sales(Amount with sum as TotalAmount)))

      with

      GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count with sum as SalesCount,Sales(Amount with sum as TotalAmount)))

      Show
      Ex 60: Replace GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count as SalesCount)) with GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count with sum as SalesCount)) Ex 61: Replace GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count as SalesCount, Sales(Amount with sum as TotalAmount))) with GET ~/Products?$apply=groupby((Name),aggregate(Sales/$count with sum as SalesCount, Sales(Amount with sum as TotalAmount)))

      The examples make use of $count applied to a path expression in an aggregate expression without specifying an aggregation method, e.g. aggregate(Sales/$count as SalesCount)

      This syntax construct and its semantics has been introduced in the Core specification, section 11.2.6.1 System Query Option $filter and must not be confused with the virtual property $count defined in the Data Aggregation extension specification, section 3.1.5 Virtual Property $count. It represents a common expression that, if used in the aggregate transformation, must be complemented with an aggregation method.

            Assignee:
            Unassigned
            Reporter:
            gerald.krause1
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: