[{TableOfContents }]

%%information [https://docs.mongodb.com/manual/aggregation/] %%

%%prettify 
{{{
db.orders.aggregate([
   { $match: { status: "A" } },
   { $group: { _id: "$cust_id", total: { $sum: "$amount" } } }
])
}}}
/%

!! 맵리듀스
[{Image src='https://docs.mongodb.com/manual/_images/map-reduce.bakedsvg.svg'  }]


!! 단일처리

* db.collection.estimatedDocumentCount()
* db.collection.count() 
* db.collection.distinct()

[{Image src='https://docs.mongodb.com/manual/_images/distinct.bakedsvg.svg'  }]