> For the complete documentation index, see [llms.txt](https://docs.mongoing.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mongoing.com/aggregation/aggregation-reference/aggregation-commands.md).

# 聚合命令

在本页面

* [聚合命令](#id1)
* [聚合方法](#aggregation-methods)

  > **\[success] 注意**
  >
  > 有关特定运算符的详细信息，包括语法和示例，请单击特定的运算符以转到其参考页面。

## 聚合命令

| 名称                                                                      | 描述                                                  |
| ----------------------------------------------------------------------- | --------------------------------------------------- |
| [aggregate](/aggregation/aggregation-reference/aggregation-commands.md) | 使用聚合框架执行聚合任务，例如 group。                              |
| [count](/aggregation/aggregation-reference/aggregation-commands.md)     | 计算集合或视图中的文档数。                                       |
| [distinct](/aggregation/aggregation-reference/aggregation-commands.md)  | 显示在集合或视图中为指定 key 找到的不同值。                            |
| [mapReduce](/aggregation/aggregation-reference/aggregation-commands.md) | 对大型数据集执行[map-reduce](/aggregation/map-reduce.md)聚合。 |

## 聚合方法

| 名称                                                                                                                                                                                                                  | 描述                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [db.collection.aggregate()](/can-kao/mongo-shell-methods/collection-methods/db-collection-aggregate.md)                                                                                                             | 提供对[聚合管道](/aggregation/aggregation-pipeline.md)的访问。 |
| [db.collection.mapReduce()](https://github.com/mongodb-china/MongoDB-CN-Manual/tree/8490376c81d56eff95abbaddc6ee414b1e1c9705/docs/docs/Reference/mongo-Shell-Methods/Collection-Methods/db-collection-mapReduce.md) | 对大型数据集执行[map-reduce](/aggregation/map-reduce.md)聚合。 |

译者：李冠飞

校对：李冠飞
