Your question is Top Sales Regions SQL Join. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Bain & Company wants to compare sales performance across regional markets. Write a PostgreSQL query that identifies the top-performing regions during the first quarter of 2025.
sales to customers and regional_mapping using the customer identifier.sale_status = 'Completed' and active customers.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| customer_status | VARCHAR(20) | Customer account status |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| customer_id | INT | Customer associated with the sale |
| sale_date | DATE | Date the sale was recorded |
| sale_amount | DECIMAL(12,2) | Revenue amount for the sale |
| sale_status | VARCHAR(20) | Current sale status |
| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Mapped customer identifier |
| region_name | VARCHAR(50) | Assigned sales region |