Filter early, aggregate smart
Put $match early to reduce documents flowing through the pipeline. $unwind + $group is the bread-and-butter of analytics.
Aggregation pipelines are Turing-complete. This is either exciting or alarming.
Output
Press Run to execute your code.