Healthcare Analytics Path · Mission 6 of 25Easy

Who’s currently admitted?

Use WHERE IS NULL to filter for active admissions and JOIN to get patient names

Back to Healthcare Analytics

The Brief

James HartwellVP of Operationsslack-dm

how many patients are currently admitted? discharge_date is null for anyone still here. need count and their names + admit dates. capacity meeting at 8.

You'll practice

WHERE IS NULLJOIN

Tables available

fact_encountersdim_patients

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

An active admission is defined by missing discharge data in `fact_encounters`. Patient names are in `dim_patients`

Hint 2

Filter for rows where discharge hasn't happened yet, then join to get the human-readable patient info

Hint 3

`SELECT p.first_name, p.last_name, e.admit_date FROM fact_encounters e JOIN dim_patients p ON ___ WHERE e.discharge_date IS ___`