Vincent-Philippe Lauzon points out a few limitations with Cosmos DB:
The original DocumentDB SQL didn’t have any aggregation capacity. But it did acquire those capacities along the way.
Traditionally, that isn’t the strong spot for document-oriented databases. They tend to be more about find documents and manipulating the documents as oppose to aggregating metrics on a mass of documents.
Today, DocumentDB SQL implements the following aggregate functions:
-
COUNT
-
SUM
-
MIN
-
MAX
-
AVG
Read on for where the current aggregation limitation is, as well as more.