- Reference >
- Database Commands >
- aggregate
aggregate¶
-
aggregate
¶ New in version 2.1.0.
aggregate
implements the aggregation framework. Consider the following prototype form:Where
[collection]
specifies the name of the collection that contains the data that you wish to aggregate. Thepipeline
argument holds an array that contains the specification for the aggregation operation. Consider the following example from the aggregation documentation.More typically this operation would use the
aggregate()
helper in themongo
shell, and would resemble the following:For more aggregation documentation, please see: