Your question is SQL Readmission Rate. Start with the requirements and the one table 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.
Children's Hospital of Philadelphia uses discharge data to monitor readmissions. Write a PostgreSQL query that calculates the percentage of discharged admission episodes followed by a subsequent admission within 30 days.
Assume next_admission_date contains the next known admission date for the patient. Count an admission occurring exactly 30 days after discharge as a readmission. Exclude records without a discharge date from the denominator.
readmission_rate_pct, rounded to two decimal places.| Column | Type | Description |
|---|---|---|
| admission_idPK | INT | Unique admission identifier |
| patient_id | INT | Patient identifier |
| discharge_date | DATE | Date the admission ended |
| next_admission_date | DATE | Next known admission date for the patient |