Chapter 9 · Interview Level
55. Find Duplicate Patient Emails
Hard40 XPHealthcare
Data quality check: find all patients who share an email address with at least one other patient. Return the email, patient id, first name, and last name for each duplicate. Order by email, then by id.
Tables
- PKidINT
- first_nameTEXT
- last_nameTEXT
- date_of_birthTEXT
- genderTEXT
- emailTEXT
- phoneTEXT
- blood_typeTEXT
- cityTEXT
- stateTEXT
- FKinsurance_id→ insurance.idINT
- created_atTIMESTAMP
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.