Provider Analytics Path · Mission 5 of 30Starter

Insurance mix

Use GROUP BY to explore data distribution and spot inconsistencies

Back to Provider 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 & columns available

dim_patientsdim9 columns
ColumnTypeKey
patient_idINTPK
first_nameTEXT
last_nameTEXT
date_of_birthTEXT
genderTEXT
insurance_typeTEXT
zip_codeTEXT
primary_languageTEXT
is_deceasedINT

Hints (3)

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

Hint 1

Single-table aggregate over the patient dimension, grouped by payer.

Hint 2

GROUP BY the insurance column, COUNT per group, ORDER BY the count descending.

Hint 3

Don't normalize the casing yet — Dr. Okafor wants the raw payer mix as stored. The casing inconsistency is itself diagnostic.