Write a query to find the month-over-month growth rate of Lucid Motors vehicle deliveries, ensuring you account for regional variations.
Use the regions and vehicle_deliveries tables. Include months with recorded deliveries and return a NULL growth rate when the prior month is unavailable or has zero deliveries.
region_name, delivery_month, deliveries, prior_month_deliveries, and growth_rate_pctregion_name, then delivery_month| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique regional identifier |
| region_name | VARCHAR(100) | Lucid Motors sales region name |
| Column | Type | Description |
|---|---|---|
| delivery_idPK | INT | Unique delivery record identifier |
| region_id | INT | Region associated with the delivery |
| delivery_date | DATE | Date vehicles were delivered |
| vehicle_count | INT | Number of vehicles delivered |