You find duplicate customer records in a dataset. How do you handle them?
What the interviewer wants to hear
- Defines what counts as a duplicate (exact vs same entity)
- Measures how many duplicates exist and why
- Chooses a rule for which record to keep
- Deduplicates in a repeatable way such as ROW_NUMBER
- Reports the issue to the source owner
Model answer
First I decide what a duplicate means here. Exact copies of a row are easy, but the same customer may also appear with a different spelling or email case, so I check by a business key such as phone number or normalised email. Then I measure the size: how many rows are affected and whether they cluster around one source or date, which hints at the cause, like a double import. Next I agree a keep rule, for example keep the most recently updated record, and apply it in a repeatable way, such as ROW_NUMBER partitioned by the key and ordered by updated_at descending, keeping row 1. I never just delete rows by hand in a spreadsheet. Finally I note the change in my analysis and tell the data owner, so the problem is fixed at the source.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Data Analyst questions
- Explain the difference between INNER JOIN, LEFT JOIN and FULL OUTER JOIN with a simple example.
- You receive a new dataset from a client. What steps do you take to clean it before analysis?
- When would you use the median instead of the mean? Give a business example.
- How do you decide which chart to use for a piece of data?
- How would you explain a data finding to a manager who is not technical?
- Walk me through one analysis you did from start to finish.
- How do you check that the numbers from your SQL query are correct before you share them?
- What is the difference between VLOOKUP and XLOOKUP, and which do you prefer?
- What is the difference between a metric and a KPI? Give an example.