A practical use for single-purpose aggregation is to present results in a certain order (via sorting), and limiting the number of results which appear at the end of a query. A more complex form of aggregation, the aggregation pipeline, might be used to:
- Manipulate documents, which include embedded objects or arrays
- Optimize results when operating on a sharded cluster (https://docs.mongodb.com/manual/sharding/#sharded-cluster)
In the former case, single-purpose aggregation is not useful if you want to sort the values in an array, which is embedded in a document. As for the latter case, a sharded cluster is where you have a subset of the database distributed across a set of servers which are networked together. Aggregation ...