Your question is Find Duplicate Records in SQL. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Johns Hopkins Medicine needs to identify duplicate patient records before a data quality cleanup. Write a SQL query to find records that appear more than once based on the same first_name, last_name, and date_of_birth.
| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Primary key for each patient record |
| first_name | VARCHAR(100) | Patient first name |
| last_name | VARCHAR(100) | Patient last name |
| date_of_birth | DATE | Patient date of birth |
| mrn | VARCHAR(20) | Medical record number |
| created_at | TIMESTAMP | Record creation timestamp |