Hi All
I need some help with a complex query (or maybe it's not that complex for the experts here).
I have a table which contains a large amount of data. Among them a lot of duplicates. below tablestructure :
ID BIRTHDAY NAME EMAIL
1 12/12/1980 John
john@example.com
2 John
john@example.com
3 11/11/1970 Lisa
lisa@example.com
Now, as you can see , the record
john@example.com is a duplicate in the table. However, the first record with
john@example.com contains more data then the second one (birthday field is completed in the first record).
I would like to deduplicate my table but retain the record with the most data in it. So in this case the second record (ID 2) should be deleted since it contains less data then ID 1
Is this possible?
And if so , how would you proceed ?
thank you in advance,