Your question is Top Readmission Rates Query. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Dana-Farber Cancer Institute needs to identify departments with the highest patient readmission rates. A readmission is a subsequent admission for the same patient within 30 days after discharge from an eligible index admission.
Write a PostgreSQL query that analyzes index admissions from the six months ending on the query execution date. For sample-data verification, assume the query runs on 2026-08-29.
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Dana-Farber department name |
| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Illustrative patient name |
| Column | Type | Description |
|---|---|---|
| admission_idPK | INT | Unique admission identifier |
| patient_id | INT | Patient associated with the admission |
| department_id | INT | Department responsible for the admission |
| admit_date | DATE | Date the patient was admitted |
| discharge_date | DATE | Date the patient was discharged |
| admission_type | VARCHAR(30) | Admission classification |