I need to delete only the records if the location id is different and values in the remaining columns are same.
In below example, first 3 records and last two records has to to be deleted
ID | ID_SEQ |TS_DT | EID |LOCATION_ID
123 |1 | 10/10/2109 | hello | W123
123 |1 | 10/10/2019 | hello | A123
123 |1 | 10/10/2019 | hello | A123
123 |2 | 10/10/2019 |hello | A123
124 |1 | 10/11/2019 |hellos | A231
124 |1 | 10/11/2019 |hello | A231
124 | 3 | 10/13/2019 | mgs | E123
125 | 3 | 10/13/2019 | mgs | E123
124 |2 | 10/12/2019|hello | A231
345 |3 | 11/10/2019 |rgs | A123
345 |3 | 11/10/2019 |rgs | W123
Expected output: delete records if location id is different and values in the remaining columns are same (On the same day, Should not be map two different location id(s) to same ID,ID_SEQ_ID and EID combination)
ID | ID_SEQ |TS_DT | EID | LOCATION_ID
123 | 1 | 10/10/2109 | hello | W123
123 | 1 | 10/10/2019 | hello | A123
123 | 1 | 10/10/2019 | hello | A123
345 | 3 | 11/10/2019 | rgs | A123
345 | 3 | 11/10/2019 | rgs | W123