1、统计查询 eid记录重复 查询大于1 eid重复的记录 db.xiezi.aggregate( [ { $group: { _id: "$eid", count: { $sum: 1 } } }, { $match: { count: { $gt: 1 } } }] )SELECT eid, count(*) FROM xiezi BY eid HAVING count(*) > 1 来源:https://www.cnblogs.com/weiyiyong/p/11895807.html 标签 eid