Need Assistance?

support@tutorialshub.in

Aggregation Framework

Grouping & Accumulators ($group, $sum, $avg)

ADVERTISEMENT
MongoDB Free Lesson
5 min read
ADVERTISEMENT

The $group stage groups documents by a specified _id expression (use _id: null to aggregate across the entire collection) and computes metrics using accumulators like $sum, $avg, $min, and $max.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you