Pipeline Practice

Roll up regional revenue

`$group` changes the grain of the stream. The `_id` expression defines each group, while accumulators describe the measurements you keep.

For completed orders, return revenue and order count by region, highest revenue first.

Expected result: Four regional summary documents.

Example pipeline syntax

[
  { $match: { status: "completed" } }
]