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

What does this aggregation return for the 'total' field, given documents where some have a missing 'amount' field and others have amount: null?

db.sales.aggregate([ { $group: { _id: "$region", total: { $sum: "$amount" } } } ])