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

What does this pipeline produce in the `_id` field of each output group, and what does the `$group` `_id: null` form do?

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