Write SQL to find the top 3 hospitals by readmission rate in each region.
Use the hospitals and patient_discharges tables. Calculate readmission rate as readmitted discharges divided by eligible discharges with a known readmission value.
region, hospital_id, hospital_name, eligible_discharges, readmitted_discharges, readmission_rate, and regional_rank| Column | Type | Description |
|---|---|---|
| hospital_idPK | INTEGER | Unique hospital identifier |
| hospital_name | VARCHAR(100) | Hospital name |
| region | VARCHAR(50) | Geographic region containing the hospital |
| Column | Type | Description |
|---|---|---|
| discharge_idPK | INTEGER | Unique discharge record identifier |
| hospital_id | INTEGER | Hospital associated with the discharge |
| discharge_date | DATE | Date of discharge |
| readmitted_30d | BOOLEAN | Whether the patient was readmitted within 30 days |