db.tablename.aggregate([ {"$group" : {_id:"$fieldname", count:{$sum:1}}} ])
mongodb group by 统计
最新推荐文章于 2025-06-11 02:00:00 发布
db.tablename.aggregate([ {"$group" : {_id:"$fieldname", count:{$sum:1}}} ])