Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Readmissions Within 30 Days

Return the patient_id of every patient who was admitted again within 30 days after a previous discharge (a later admit_date that is after the discharge date and at most 30 days after it). Return each patient once.

Table schema

Admissions(id INT PRIMARY KEY, patient_id INT, admit_date DATE, discharge_date DATE)

Sample data

id | patient_id | admit_date | discharge_date
1 | 1 | 2026-01-01 | 2026-01-05
2 | 1 | 2026-01-20 | 2026-01-25
3 | 2 | 2026-02-01 | 2026-02-03
4 | 2 | 2026-04-01 | 2026-04-02
5 | 3 | 2026-03-01 | 2026-03-04

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.