How to perform grouping in mongodb like lodash chain and groupby
You can try,
$group
to push request in request field$match
to check condition using$anyElementTrue
db.collection.aggregate([ { $group: { _id: "$key", request: { $push: "$request" }, count: { $sum: 1 }, amount: { $sum: "$amount" } } }, { $match: { $expr: { $eq: [false, { $anyElementTrue: "$request" }] } } }])