mongodb 实现group by 多个key having count(*) >1

xiaoxiao2021-02-28  95

db.sysRequestWrapper.aggregate(     {"$group": {_id:{card:"$card",account:"$account"}, "count": { "$sum": 1 } } },     {"$match": {"_id" :{ "$ne" : null } , "count" : {"$gt": 1} } } )
转载请注明原文地址: https://www.6miu.com/read-41404.html

最新回复(0)