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

What does this aggregation output for the count of the resulting group?

db.c.insertMany([ { type: "A" }, { type: "A" }, { other: 1 } ]); db.c.aggregate([ { $group: { _id: "$type", count: { $sum: 1 } } } ]);