Pipeline stages: Unix pipes for documents
Stages like $match, $group, $sort, $project transform documents sequentially.
Quirk: $group requires _id — use null for grand totals or $product to group by field.
Output
Press Run to execute your code.