Alternative to group by for cosmos db

Viewed 19268

Given that cosmos db does not support group by, what is a good alternative to achieve similar functionality:

Select sum(*) , groupterm from tble group by groupterm

Can I efficiently achieve this in a cosmos stored procedure?

3 Answers

Finally, Azure Cosmos DB currently supports GROUP BY in .NET SDK 3.3 or later. Support for other language SDK's and the Azure Portal is not currently available but is planned.

<group_by_clause> ::= GROUP BY <scalar_expression_list>

<scalar_expression_list> ::=
          <scalar_expression>
        | <scalar_expression_list>, <scalar_expression>

enter image description here

Related