Database
db={Player:[{"_id":"5f0cc0e676de351ce21a752b","language":"pt-br","country":"BR","status":true,"name":"Laura Silva","nickname":"laurasilva","dateOfBirth":"1995-05-01T00:00:00.000Z","email":"laurasilva@gmail.com","phones":[],"cpf":"54721452365","gender":"F","father":"Luiz Silva","mother":"Larissa Silva","weight":"67","height":"1.67","currentTeam":{"name":"América","initialDate":"2020-01-01"},"professionalPlayer":true,"bird":"ARW1","idSports":"5f0cbe10e6c0930b8dcc5181","competitions":[],"exams":[],"preference":[],"coachReferrals":[],"createdAt":"2020-07-13T20:15:34.348Z","updatedAt":"2020-07-13T20:15:34.348Z","__v":0,"idAgent":null,"idClub":null},{"_id":"5ee644c0280583764bfe7d97","currentTeam":{"name":"Cruzeiro","initialDate":"2019-02-25"},"network":{"instagram":{"url":"@renanmoaesoficial"}},"language":"pt-br","country":"BR","status":true,"name":"Renan Moraes","nickname":"renanmoraes","dateOfBirth":"1993-01-21T00:00:00.000Z","email":"renan.desenvolviemnto@gmail.com","phones":[{"_id":"5ee644c0280583764bfe7d98","phone":"(31) 98796-1357"}],"cpf":"123.367.952-85","gender":"M","father":"Antonio","mother":"Sandra","weight":"1,80","height":"45","professionalPlayer":false,"bird":"2551566655","idSports":"5ee640d040b0a0649799c531","exams":[{"results":[],"attestation":[],"_id":"5ee644c0280583764bfe7d9a","idExams":"5ee6405f061a1362c3778435"},{"results":[],"attestation":[],"_id":"5ee644c0280583764bfe7d99","idExams":"5ee6406e061a1362c3778436"}],"standardPhoto":"https://exame.com/wp-content/uploads/2018/10/capaprofile.jpg?quality=70&strip=info","competitions":[],"preference":[],"coachReferrals":[],"createdAt":"2020-06-14T15:39:44.198Z","updatedAt":"2020-06-14T15:39:44.198Z","__v":0,"idAgent":null,"idClub":"5f176c8d58beb94efe56c59b"}],Exams:[{"_id":"5ee6406e061a1362c3778436","status":true,"name":"Exames das prostatas","value":"1","type":"A","createdAt":"2020-06-14T15:21:18.114Z","updatedAt":"2020-06-14T15:21:18.114Z","__v":0},{"_id":"5ee6405f061a1362c3778435","status":true,"name":"Exames dos rins","value":"3","type":"M","createdAt":"2020-06-14T15:21:03.405Z","updatedAt":"2020-06-14T15:21:03.405Z","__v":0}],Sports:[],Galery:[],EvaluationPlayer:[],Evaluation:[],Club:[],Agent:[]}
Query
db.Player.aggregate([{"$lookup":{from:"Exams",localField:"exams.idExams",foreignField:"_id",as:"allExams"}},{$lookup:{from:"Sports",localField:"idSports",foreignField:"_id",as:"sportPracticed"}},{$unwind:{"path":"$sportPracticed","preserveNullAndEmptyArrays":true}},{$lookup:{from:"Galery",localField:"_id",foreignField:"idPlayer",as:"galery"}},{$lookup:{from:"EvaluationPlayer",localField:"_id",foreignField:"idPlayer",as:"evaluationPlayer"}},{$lookup:{from:"Evaluation",localField:"evaluationPlayer.idEvaluation",foreignField:"_id",as:"evaluations"}},{$lookup:{from:"Category",localField:"evaluations.idCategory",foreignField:"_id",as:"category"}},{$lookup:{from:"Club",localField:"idClub",foreignField:"_id",as:"club"}},{$unwind:{"path":"$club","preserveNullAndEmptyArrays":true}},{$lookup:{from:"Agent",localField:"idAgent",foreignField:"_id",as:"agent"}},{$unwind:{"path":"$agent","preserveNullAndEmptyArrays":true}},{$match:{$and:[{allExams:{$elemMatch:{deletedAt:{$exists:false}}}},{galery:{$elemMatch:{deletedAt:{$exists:false}}}},{evaluationPlayer:{$elemMatch:{deletedAt:{$exists:false}}}},{evaluations:{$elemMatch:{deletedAt:{$exists:false}}}},{category:{$elemMatch:{deletedAt:{$exists:false}}}},{"sportPracticed.deletedAt":{$exists:false}},{"club.deletedAt":{$exists:false}},{"agent.deletedAt":{$exists:false}},]}}])