In a MEAN stack application, you need to perform a MongoDB aggregation that groups documents by a field, calculates an average, and then filters groups where the average exceeds a threshold. Which pipeline stage order is correct?
-
A
$match → $group → $match
-
B
$group → $project → $match
-
C
$project → $group → $filter
-
D
$group → $match → $project