Clinical Trials & Research Analytics Path · Mission 2 of 25Easy

Enrollments per site

First two-table join: fact_enrollments to dim_sites on site_id. Practice INNER JOIN, GROUP BY on a dimension attribute, and ranking sites by enrollment volume — the most common operational report at any sponsor or CRO.

The Brief

Hannah ReedSite Activation Leadslack-dm

The site management call is at 2pm. I need a roster of every site name with how many total enrollments they’ve recorded across all trials — site_name and enrollment_count, sorted with the highest-enrolling site at the top. Tiebreaker: site_name ascending so the order is stable when two sites tie. Pull from fact_enrollments joined to dim_sites on site_id. This is the standing scorecard our site managers see weekly; if a site is at the bottom three weeks running, we have a conversation.

You'll practice

INNER JOIN2-table aggregationORDER BY DESC

Tables & columns available

fact_enrollmentsfact8 columns
ColumnTypeKey
enrollment_idINTPK
trial_idINTFK → dim_trials
protocol_idINTFK → dim_protocols
patient_idINTFK → dim_trial_patients
site_idINTFK → dim_sites
enrolled_dateTEXT
statusTEXT
withdrawal_reasonTEXT
dim_sitesdim9 columns
ColumnTypeKey
site_idINTPK
site_nameTEXT
cityTEXT
stateTEXT
regionTEXT
site_typeTEXT
enrollment_capacityINT
pi_nameTEXT
activated_dateTEXT

Hints (3)

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

Hint 1

Two-table join: enrollments to sites on the site key. Group on the site's human-readable name so the report header is meaningful.

Hint 2

The aggregate is a row count per site. Name the output column for the metric.

Hint 3

Stable ordering: rank descending by the metric, then alphabetic on site name as the tiebreaker. Result has one row per site that appears in fact_enrollments (INNER JOIN); every site in dim_sites has at least one enrollment in this dataset, so expect 15 rows.