I’ve got a database my_table [id,first,second,third] with a lot of entries and want to delete duplicate data of entries [first,second,third].
so that no duplicate for first and no duplicate for second and no duplicate for third
just any duplicate on each then will be deleted.
id first second third
1 addy any robert
2 addy kevin steve
3 jack ben adam
here i will remove duplicate for first so remove 2 addy kevin steve
I would do this in several steps. I would first get a list of all duplicate entries by running the query:
This should (theoretically… I can’t test it) return a list of all “firsts” that have duplicates.
Then I would loop through each “first” in the list and run:
That should get you started!