Your question is Multiple Admissions Same Month. Start with the requirements and the two 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.
Providence patient encounter reporting needs to flag patients with repeated inpatient admissions during the same calendar month. Write a PostgreSQL query using the patients and admissions tables.
| Column | Type | Description |
|---|---|---|
| patient_idPK | INTEGER | Unique patient identifier |
| full_name | VARCHAR(100) | Patient's full name |
| birth_date | DATE | Patient's date of birth |
| Column | Type | Description |
|---|---|---|
| admission_idPK | INTEGER | Unique admission identifier |
| patient_id | INTEGER | Patient associated with the admission |
| admitted_at | TIMESTAMP | Admission timestamp |
| discharge_date | DATE | Discharge date when available |
| admission_type | VARCHAR(30) | Admission classification |