How would you delete duplicate records in SQL?
Assume duplicate rows have identical values in record_key, record_value, and source_system. Keep the row with the smallest record_id and delete the remaining copies.
deleted_record_id.deleted_record_id ascending.| Column | Type | Description |
|---|---|---|
| record_idPK | BIGINT | Unique identifier for the record |
| record_key | VARCHAR(50) | Business key used to identify the record |
| record_value | VARCHAR(100) | Value associated with the business key |
| source_system | VARCHAR(30) | System that created the record |
| created_at | TIMESTAMP | Timestamp when the record was created |