Back to Developer Roadmap

$group

src/data/roadmaps/mongodb/content/[email protected]

4.0748 B
Original Source

$group

The $group aggregation stage groups documents by specified identifier expressions and applies accumulator operators like $sum, $avg, $max, $min, and $push. It's essential for data aggregation, calculating statistics, and creating summary reports. $group can group by single or multiple fields and supports complex expressions for dynamic grouping criteria.

Visit the following resources to learn more: