Healthcare Analytics Path · Mission 5 of 25Starter

Insurance mix

Use GROUP BY to explore data distribution and spot inconsistencies

Back to Healthcare Analytics

The Brief

Dr. Amara OkaforChief Quality Officerquality-analytics

What's our payer mix? Show each insurance type and how many patients we have for each. This tells me a lot about our patient population — Medicare patients have very different needs from commercial insurance patients.

You'll practice

GROUP BYCOUNTData quality

Tables available

dim_patients

Hints (3)

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

Hint 1

Everything you need is in `dim_patients` — no joins. One row per insurance type with a patient count

Hint 2

Group the patient rows by insurance_type, count each group, and sort largest-first

Hint 3

`SELECT insurance_type, ___(*) AS patient_count FROM dim_patients GROUP BY ___ ORDER BY ___ DESC`