Given two pandas DataFrames, perform data manipulation to find the maximum-profit region / sales figures
Asked in the round 2 stage. The candidate was asked to code in any editor or notepad and solved it with SQL. Use the regions and sales tables.
region_id, region_name, total_sales, and total_profit.total_profit descending, then region_name ascending.| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique region identifier |
| region_name | VARCHAR(100) | Region display name |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| region_id | INT | Region associated with the sale |
| sale_amount | DECIMAL(12,2) | Revenue generated by the sale |
| cost_amount | DECIMAL(12,2) | Cost associated with the sale |
| status | VARCHAR(20) | Sale processing status |