Database

db={"SalesInvoice":[{"_id":1,"CustomerID":"1","total":100},{"_id":2,"CustomerID":"1","total":200},{"_id":3,"CustomerID":"3","total":50}]}

Query

db.SalesInvoice.aggregate([{$lookup:{from:"SalesInvoice",let:{custID:"$CustomerID"},pipeline:[{$match:{$expr:{$eq:["$CustomerID","$$custID"]}}}],as:"salesInvoices"}},{$match:{$expr:{$gt:[{$size:"$salesInvoices"},1]}}},{$unset:"salesInvoices"},{$out:"newCollection"}])

Result