Use Order By with Group By
In the documentation for group by (https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-group-by) you state:
You currently cannot use GROUP BY with an ORDER BY clause but this is planned.
Adding here so we can hopefully get some feedback on its progress and to communicate its importance to the community.
In all my use cases for using group by, I am only interested in returning a subset of the results which without order by I cannot. I must return all results and then order & filter them in the client which is poor from a performance and cost perspective or completely unfeasible depending on the size of the group set.
We will soon support order by properties in GROUP BY clause only, but sorting by aggregated values in SELECT clause is unplanned.
Андрій Чебукін commented
How soon could it be available?
Erik O'Leary commented
It would be great to have some ballpark ETA on this feature.