Write a SQL query to identify the top three most profitable home models across different regional divisions over the last fiscal year at Lennar.
Use the provided 2024 sales data as the last fiscal year. Profit is sale price minus construction cost. Return the top three models independently within each regional division.
division_name, model_name, total_profit, and model_rank.| Column | Type | Description |
|---|---|---|
| division_idPK | INT | Unique regional division identifier |
| division_name | VARCHAR(100) | Name of the regional division |
| Column | Type | Description |
|---|---|---|
| model_idPK | INT | Unique home model identifier |
| model_name | VARCHAR(100) | Name of the Lennar home model |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique home sale identifier |
| division_id | INT | Regional division associated with the sale |
| model_id | INT | Home model sold |
| sale_date | DATE | Date the home sale was recorded |
| sale_price | DECIMAL(12,2) | Final sale price |
| construction_cost | DECIMAL(12,2) | Construction cost for the home |