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 |