본문 바로가기
SQL/MongoDB

mongo db group count 방법

by SSaMKJ 2016. 3. 22.

mongo db group count 방법




db.getCollection('product_crawling_queue').aggregate({
    $group: {
        _id: {
            site_id: "$site_id"
        },
        count: {
            $sum: 1
        }
    }
})


댓글0