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

 

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