Provider Analytics Path · Mission 3 of 25Starter

Total encounter volume

Use COUNT to aggregate rows in a fact table

Back to Provider Analytics

The Brief

James HartwellVP of Operationsslack-dm

quick — how many total encounters do we have on record? just one number. board wants volume stats by noon.

You'll practice

COUNTAggregation

Tables & columns available

fact_encountersfact10 columns
ColumnTypeKey
encounter_idINTPK
patient_idINTFK → dim_patients
provider_idINTFK → dim_providers
department_idINTFK → dim_departments
admit_dateTEXT
discharge_dateTEXT
diagnosis_codeTEXT
diagnosis_descriptionTEXT
encounter_typeTEXT
discharge_dispositionTEXT

Hints (3)

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

Hint 1

Each row in `fact_encounters` represents one patient encounter. You need a single number summarizing every row

Hint 2

This is an aggregate over the whole table — no grouping or filtering. Which aggregate function tallies rows?

Hint 3

`SELECT ___(*) AS total_encounters FROM fact_encounters` — what aggregate goes in the blank?