Your question is Top Three Performing Sales Regions. Start with the requirements and the two 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.
Merck's commercial analytics team is reviewing 2025 net sales for Keytruda across active sales regions. The dashboard should identify the strongest regions using completed transactions only.
Write a PostgreSQL query that returns the top three active sales regions by total Keytruda net sales during calendar year 2025.
| Column | Type | Description |
|---|---|---|
| region_idPK | INTEGER | Unique sales region identifier |
| region_name | VARCHAR(100) | Display name of the sales region |
| is_active | BOOLEAN | Indicates whether the region is active |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INTEGER | Unique sales transaction identifier |
| region_id | INTEGER | Sales region associated with the transaction |
| product_name | VARCHAR(100) | Merck product sold |
| sale_date | DATE | Date when the sale was recorded |
| status | VARCHAR(30) | Transaction processing status |
| net_sales_usd | NUMERIC(14,2) | Net sales amount in US dollars |