Sigmoid Analytics wants to compare product performance across sales regions. Write a PostgreSQL query that joins product metadata with sales transactions and returns the highest-revenue products in each region.
| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product name |
| category | VARCHAR(50) | Product category |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| product_id | INT | Product associated with the sale |
| region | VARCHAR(50) | Sales region |
| quantity | INT | Number of units sold |
| unit_price | NUMERIC(10,2) | Price per unit |
| sale_date | DATE | Date of the sale |
| status | VARCHAR(20) | Sale processing status |