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

Given this pipeline, what does the $group stage produce for the count?

db.orders.aggregate([ { $group: { _id: "$status", n: { $sum: 1 } } } ]) // Some documents have no 'status' field at all