Docs HomeMongoDB Manual

Aggregation Commands聚合命令

Note

For details on a specific command, including syntax and examples, click on the link to the command's reference page.有关特定命令的详细信息,包括语法和示例,请单击该命令参考页的链接。

Name名称Description描述
aggregatePerforms aggregation tasks such as $group using an aggregation pipeline.使用聚合管道执行聚合任务,如$group
countCounts the number of documents in a collection or a view.统计集合或视图中的文档数。
distinctDisplays the distinct values found for a specified key in a collection or a view.显示在集合或视图中为指定键找到的不同值。
mapReducePerforms map-reduce aggregation for large data sets.对大型数据集执行映射缩减聚合。

For a detailed comparison of the different approaches, see Aggregation Commands Comparison.有关不同方法的详细比较,请参阅聚合命令比较