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

What does this aggregation stage return for the accumulator field when run on a collection where some documents lack the 'score' field entirely?

db.games.aggregate([ { $group: { _id: "$player", totalScore: { $sum: "$score" } } } ])