IT/Database

[mongodb] aggregation

DreamKiHyun 2017. 7. 11. 17:35

### url 별 카운트 집계


db.mycollection.aggregate([

{"$group" : {_id:"$url", count:{$sum:1}}},

{$sort:{"count" : -1}}

])