Navigation
This version of the manual is no longer supported.

Aggregation

In version 2.2, MongoDB introduced the aggregation framework that provides a powerful and flexible set of tools to use for many data aggregation tasks. If you’re familiar with data aggregation in SQL, consider the SQL to Aggregation Mapping Chart document as an introduction to some of the basic concepts in the aggregation framework. Consider the full documentation of the aggregation framework here:

In addition to the aggregation framework, MongoDB provides simple aggregation methods and commands, that you may find useful for some classes of tasks: