db.tablename.aggregate([ {"$group" : {_id:"$fieldname", count:{$sum:1}}} ])
mongodb group by 统计
最新推荐文章于 2024-07-24 01:44:55 发布
db.tablename.aggregate([ {"$group" : {_id:"$fieldname", count:{$sum:1}}} ])