$group: Totals, Counts and Averages

The $group stage sorts documents into groups by the value of a field, or puts them all in one group, and computes each group's total, count, average, smallest, biggest and first value with accumulators.

By

Updated

Cheat sheet: $group: Totals, Counts and Averages
Category
MongoDB
Level
Journeyman
Tags
$group, Accumulator (mongodb), Aggregation Pipeline, Field Path, mongodb