MongoDB Query Language (MQL) Aggregation Commands
Aggregation operations process data records and return computed results. They group values from multiple documents, perform operations on the grouped data, and return a single result. Common aggregation tasks include calculating averages, sums, and counts.
Aggregate
The aggregate command is used to process data records and return computed results.
Count
Count command is used to count the number of documents in a collection that match a specified query.
Distinct
The distinct command is used to find the unique values for a specified field across a single collection.