1):查询重复数据
db.getCollection(‘users‘).aggregate([ { $group: { _id : ‘$goodsId‘, count: { $sum : 1 } } }, { $match: { count: { $gt : 1} } } ])
持续更新....
2022-10-02 22:49:41
1):查询重复数据
db.getCollection(‘users‘).aggregate([ { $group: { _id : ‘$goodsId‘, count: { $sum : 1 } } }, { $match: { count: { $gt : 1} } } ])
持续更新....