$sum requires a field path starting with $, but "amount" is missing the $.
Step 2: Confirm correct syntax
It should be $sum: "$amount" to sum the amount field values.
Final Answer:
Missing $ before amount in $sum operator -> Option A
Quick Check:
$sum needs $field syntax [OK]
Hint: Field names in aggregation need $ prefix [OK]
Common Mistakes:
Forgetting $ before field names in operators
Assuming $match is mandatory before $group
Misusing _id field in $group
5. You want to pre-aggregate sales data by month and product category, storing total sales and average price. Which aggregation pipeline correctly computes these values?