db.getCollection('Transaction').aggregate([
{"$group" : { "_id": "$transactionNo", "count": { "$sum": 1 }, "ids":{"$push":"$_id"} } },
{"$match": {"_id" :{ "$ne" : null } , "count" : {"$gt": 1} } }
])
db.getCollection('Transaction').aggregate([
{"$group" : { "_id": "$transactionNo", "count": { "$sum": 1 }, "ids":{"$push":"$_id"} } },
{"$match": {"_id" :{ "$ne" : null } , "count" : {"$gt": 1} } }
])