Business Intelligence Path · Mission 9 of 25Easy

How many unique customers per region?

Use COUNT(DISTINCT) across joins and understand distinct counting in aggregation

Back to Business Intelligence

The Brief

Victoria ChenCEOslack-dm

I want to see regional rep coverage — for each region (include all of them), how many distinct sales reps have closed at least one deal there? Also show the total number of transactions and total revenue. I want all regions listed even if the count is zero.

You'll practice

COUNT DISTINCTJOINs

Tables available

dim_regionsfact_sales

Hints (3)

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

Hint 1

LEFT JOIN dim_regions to fact_sales to keep EMEA (the ghost region) in results

Hint 2

COUNT(DISTINCT s.employee_id) gives you unique reps per region

Hint 3

Use COALESCE for the zero-sale region to avoid NULLs