Beginner · 20 min · 5 steps
The same click counted twice: how to find and remove copies
Divya Menon, Senior Data Platform Engineer at AdStream Global
It is Monday, 8:30 AM. Divya Menon is a data engineer at AdStream Global, a company that shows ads on about 400 websites in India and counts the clicks on them. The head of billing has just sent her an urgent message. Over the weekend, three big website partners complained about their bills.
The question
Which rows are copies of one real click, which copy should we keep, and how do we prove the cleaned table has no copies left?
- GROUP BY HAVING
- ROW_NUMBER
- Deduplication
- Data checks
The rest of this case study is locked
The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.