Hospital Revenue Cycle Management Path · Mission 6 of 25Medium

Top 10 highest-revenue CPTs

First step into Medium tier — 4-table chain (charges → claims → remits + dim_cpt) with SUM, ORDER BY DESC, LIMIT. The canonical 'top revenue drivers' shape that opens every brand-new RCM director's first weekly review. The on-ramp from Easy aggregations to the percent / NTILE / RANK patterns in Hard tier (M11-M14).

The Brief

James OrtizDenials Specialistslack-dm

New denials role this quarter — Sarah asked me to start by understanding which CPT codes carry the most paid revenue, since those are the codes a 1% denial rate hits hardest in dollar terms. Pull from fact_remits joined back through claims and charges to dim_cpt; output cpt_code, description, total_revenue (SUM of paid_amount, rounded to 2 decimals). Sort by total_revenue descending. Top 10 only — that's the focus list for our denials prevention plan.

You'll practice

INNER JOINSUMORDER BY DESCLIMIT

Tables & columns available

fact_remitsfact8 columns
ColumnTypeKey
remit_idINTPK
claim_idINTFK → fact_claims
posted_dateTEXT
allowed_amountREAL
paid_amountREAL
adjustment_amountREAL
denial_codeTEXT
denial_reasonTEXT
fact_claimsfact6 columns
ColumnTypeKey
claim_idINTPK
charge_idINTFK → fact_charges
payer_idINTFK → dim_payer
submission_dateTEXT
claim_statusTEXT
submitted_amountREAL
fact_chargesfact7 columns
ColumnTypeKey
charge_idINTPK
patient_idINTFK → dim_patient
provider_idINTFK → dim_provider
cpt_codeTEXTFK → dim_cpt
service_dateTEXT
billed_amountREAL
posted_amountREAL
dim_cptdim5 columns
ColumnTypeKey
cpt_codeTEXTPK
descriptionTEXT
service_lineTEXT
charge_amountREAL
rvuREAL

Hints (3)

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

Hint 1

Multi-table chain. Start at fact_remits (the dollars), bridge through fact_claims and fact_charges to reach dim_cpt for the readable description.

Hint 2

Aggregate at CPT grain. SUM the paid_amount across all matching remits, group by cpt_code (and description, since description is in the SELECT and not aggregated).

Hint 3

Top-N pattern: ROUND the dollar sum to 2 decimals, sort descending on total_revenue with cpt_code ASC as a stable tiebreaker, then cap with LIMIT 10.