- Each stage takes the output of the previous stage as its input
- Stages run in the order they're written — put $match early to filter down data fast
- Can fully replace many application-side JOIN + aggregate logic
Aggregation Framework Overview
A declarative pipeline for transforming, filtering and summarizing data — MongoDB's answer to SQL's GROUP BY/JOIN/HAVING.