Consider I have an odata query like this:
Sessions?$apply=filter(SomeColumn eq 1)/groupby((Application/Name), aggregate(TotalLaunchesCount with sum as Total))
Sessions and Application entities are linked by ApplicationId. I want to apply orderby on "Total" and get top 5 results as odata query response.
I tried adding &$top=5
at the end of the above mentioned query. Its says:
The query specified in the URI is not valid. Could not find a property named 'Total' on type 'Sessions'.
Can anyone tell me if such query is supported?
It is supported. $skip, $top, $orderby are "performed" on result from $apply chain. In this case query should looks like this:
3.15 Evaluating $apply