Interview practice question
Double counting with many-to-many relationships
Data Analyst · SQL for Analytics · Experienced
Campaigns can target many segments, and customers belong to many segments. Your revenue-per-campaign report overcounts. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Many-to-many join multiplies rows.
- Bridge tables; decide allocation rule.
- Count distinct customers/orders.
- Allocate credit fractionally.
- Clarify that totals won't sum.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.