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

Average Hospital Stay by Department

Length of stay is discharge_date minus admit_date in days. Return each department and its average stay rounded to 2 decimals, ordered by department.

Table schema

Admissions(id INT PRIMARY KEY, dept VARCHAR(20), admit_date DATE, discharge_date DATE)

Sample data

id | dept | admit_date | discharge_date
1 | Cardiology | 2026-01-01 | 2026-01-05
2 | Cardiology | 2026-01-10 | 2026-01-13
3 | Ortho | 2026-02-01 | 2026-02-08
4 | Ortho | 2026-02-10 | 2026-02-12
5 | Ortho | 2026-03-01 | 2026-03-02

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.