Pharma Commercial Analytics Path · Mission 2 of 25Easy

HCPs in cardiology specialty

Filter dim_hcp on a TEXT specialty column. Cardiologists are the highest-priority audience for the Cardiozin launch; pulling the cardiology subset is the first step before any targeting or call planning.

The Brief

Riley SinghJunior Analystslack-dm

Brand asked me to count our cardiology HCPs before the field force gets the Cardiozin call list. From dim_hcp, give me every HCP whose specialty is 'Cardiology' — name, decile, target flag, and territory. Sort by decile descending so the top-tier prescribers lead, then alphabetical on hcp_name as a stable tiebreaker. The specialty column is TEXT and case-sensitive; use the exact 'Cardiology' string.

You'll practice

WHERE filterSingle-table SELECTORDER BY

Tables & columns available

dim_hcpdim6 columns
ColumnTypeKey
npiTEXTPK
hcp_nameTEXT
specialtyTEXT
decileINT
is_targetINT
territory_idINTFK → dim_geography

Hints (3)

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

Hint 1

Single-table SELECT with a WHERE filter. dim_hcp has the specialty column; filter to the 'Cardiology' literal exactly (capital C, no plural).

Hint 2

No aggregation — one row per cardiology HCP. Project the four columns Riley named (hcp_name, decile, is_target, territory_id).

Hint 3

Stable two-level sort: top-decile cardiologists need to lead the call list, with an alphabetic tiebreaker so the order doesn't shuffle when 5+ HCPs share a decile.