Write a SQL query to analyze manufacturing performance by plant and month, including output volume, defect rate, and month-over-month change.
Use the provided plant and production data. Treat month-over-month change as the percentage change in output volume from the previous available month for the same plant.
plant_name, month, output_volume, defect_rate, and output_mom_change_pct.plant_name, then month ascending.| Column | Type | Description |
|---|---|---|
| plant_idPK | INT | Unique manufacturing plant identifier |
| plant_name | VARCHAR(100) | Manufacturing plant name |
| city | VARCHAR(100) | City where the plant is located |
| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique production record identifier |
| plant_id | INT | References the manufacturing plant |
| production_date | DATE | Date of production |
| units_produced | INT | Number of units produced |
| defects | INT | Number of defective units reported |