Your question is Top Underperforming Regions by Growth. 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.
Ventura Foods Operations needs to identify regions with declining revenue. Assume the analysis date is 2025-07-15, so the last completed quarter is Q2 2025 and the comparison quarter is Q1 2025. Write a PostgreSQL query to return the three most underperforming regions.
(Q2 revenue - Q1 revenue) / Q1 revenue * 100.NULL growth rate and appear after regions with calculable growth.| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique region identifier |
| region_name | VARCHAR(100) | Ventura Foods sales region name |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| region_id | INT | Region associated with the sale |
| sale_date | DATE | Date the revenue was recorded |
| revenue | NUMERIC(12,2) | Revenue amount for the sale |