What is data deduplication?
In this task, treat duplicate backup-job records as rows that share the same job_name and repository_name. Write a SQL query to return one canonical row per duplicate set, keeping the most recent record by last_seen_at, and breaking ties by the highest job_id.
job_name, repository_name, job_id, last_seen_at, and statuslast_seen_at ties, keep the row with the highest job_idjob_name, then repository_name| Column | Type | Description |
|---|---|---|
| job_idPK | INT | Unique backup job record identifier |
| job_name | VARCHAR(100) | Backup job name |
| repository_name | VARCHAR(100) | Repository where the job stores backups |
| last_seen_at | TIMESTAMP | Most recent time this record was observed |
| status | VARCHAR(30) | Current job status |