Business Intelligence Path · Mission 2 of 25Starter

Who is hitting their sales targets?

Join targets with employee data, filter active employees, and calculate attainment

Back to Business Intelligence

The Brief

Marcus WebbVP of Salessales-ops

I need an attainment report before the QBR tomorrow. For every active sales rep, show me their name, year, quarter, target, actual, and attainment percentage. Sort by year and quarter. A couple things to watch: one of our reps is no longer with us but is still in the system — make sure they're excluded. Also Q4 2025 targets haven't been finalized yet so NULLs there are expected.

You'll practice

JOINsActive filteringAttainment

Tables available

fact_targetsdim_employees

Hints (3)

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

Hint 1

JOIN dim_employees to fact_targets on employee_id, and filter WHERE is_active = 1

Hint 2

Attainment = actual_amount / target_amount — use ROUND(..., 2) for clean output

Hint 3

NULL actual_amount values (Q4 2025) will make attainment NULL too — that's fine, don't filter them out