Your question is SQL for Duplicate Records. 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.
Principal Financial Group uses claims data for operational reporting and quality checks. Write a PostgreSQL query to identify duplicate non-void claims received during 2025.
A claim is considered a duplicate when multiple records share the same member_id, claim_date, provider_code, and claim_amount. Exclude rows with a null provider_code, but retain claims whose claim_status is null. Include member details when available, without removing duplicate claims for an unmatched member.
LEFT JOIN to add the member name, and sort by claim date and member ID.| Column | Type | Description |
|---|---|---|
| claim_idPK | INTEGER | Unique claim record identifier |
| member_id | INTEGER | Principal member identifier |
| claim_date | DATE | Date the claim was submitted |
| provider_code | VARCHAR(20) | Billing provider code |
| claim_amount | NUMERIC(10,2) | Submitted claim amount |
| claim_status | VARCHAR(20) | Claim processing status |
| Column | Type | Description |
|---|---|---|
| member_idPK | INTEGER | Unique Principal member identifier |
| member_name | VARCHAR(100) | Member's full name |
| plan_name | VARCHAR(80) | Principal insurance plan name |