db.getCollection(‘contents’).aggregate([{ ‘$group’: { ‘_id’: {‘isbn’: ‘$isbn’}, ‘count’: {‘$sum’: 1} } }, { ‘$match’: { ‘count’: {‘$gt’: 1} }}])

 

db.getCollection(“contents”).aggregate([{
$group: {
“_id”: {“isbn”: “$isbn”},
“count”: {$sum: 1}
}
}, {
$match: {
“count”: {$gt: 1}
}}])