Your question is Find Duplicate Rows in SQL. Start with the requirements and the two tables 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.
EPAM Systems uses several intake channels, including the EPAM Client Portal and EPAM CRM, to collect client contact records. Data quality analysts need to identify repeated contact values among records received from active source systems.
Write a PostgreSQL query that returns duplicate combinations of email and phone from active source systems.
client_contacts to source_systems using source_system_id.is_active is true.email and phone, return only groups occurring more than once, and include the duplicate count.| Column | Type | Description |
|---|---|---|
| contact_idPK | INT | Unique contact record identifier |
| VARCHAR(255) | Client email address | |
| phone | VARCHAR(30) | Client phone number |
| source_system_id | INT | References the intake source system |
| created_at | DATE | Date the contact record was created |
| Column | Type | Description |
|---|---|---|
| source_system_idPK | INT | Unique source system identifier |
| source_system_name | VARCHAR(100) | Name of the intake system |
| is_active | BOOLEAN | Whether the source system is active |