Use subqueries, LEFT JOIN, COALESCE, and division with NULL handling
for each department with beds, show bed count, average daily census of admitted patients, and utilization rate (census / beds). include ALL departments even telemedicine — i want to see the zeros. use COALESCE so nulls show as 0.
Each hint you reveal reduces the XP you can earn. Try the query first.
Patient-days = SUM of LOS per encounter. Daily census = patient-days / number of days in the period. Utilization = census / beds
Start from `dim_departments` with a LEFT JOIN so Telemedicine still appears. Guard against divide-by-zero when bed_count is NULL
`SELECT d.department_name, d.bed_count, COALESCE(___, 0) AS avg_daily_census, ROUND(avg_daily_census / NULLIF(d.bed_count, ___), 2) AS utilization_rate`