P20PandasIntermediateInterpret10 min

Group Sales by Region

Create a regional sales summary with revenue and unique-customer counts.

#groupby#aggregation#sales

Scenario

A regional manager needs a compact comparison of completed sales performance.

Problem statement

Group completed orders by region and calculate revenue and unique customers.

Your Task

  1. Filter the correct order status.
  2. Use named aggregations.
  3. Sort the final summary by revenue.

Columns

orders: region, customer_id, amount, status

Related Concepts

Pandas groupbyNamed aggregationCustomer metrics

Ready to count this problem?

Mark it complete when you have reasoned through the solution in your own words.