Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumMongoDBaggregation $match $groupSingle-choice MCQ

Consider this pipeline on a collection of orders. Each order has `status` and `amount`. What does it compute?

db.orders.aggregate([ { $match: { status: { $in: ["shipped", "delivered"] } } }, { $group: { _id: "$status", total: { $sum: "$amount" }, count: { $sum: 1 } } }, { $match: { count: { $gt: 100 } } } ]);