본문 바로가기

IT/Database

[mongodb] aggregation

### url 별 카운트 집계


db.mycollection.aggregate([

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

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

])

'IT > Database' 카테고리의 다른 글