Concept Flow - $group stage for aggregation
Input Documents
Apply $group Stage
Group by _id Key
Aggregate Fields (sum, avg, etc.)
Output Grouped Documents
The $group stage collects input documents, groups them by a specified key (_id), and computes aggregate values for each group.
