You can use the following syntax to group by and count in MongoDB: db.collection.aggregate([ {$group : {_id:"$field_name", count:{$sum:1}}} ]).
確定! 回上一頁