I have a table that contains the following sample data:-
ID Description
1 John Doe
2 Jane Doe
3 RETRO John Doe
3 John Doe
4 Jane Doe
4 RETRO Jane Doe
5 Bobby
ID column is not a primary key hence the duplicate ID’s
I want to select all the records from the above table, but where an ID is duplicated i only want to select the record that starts with ‘RETRO’ and ignore the other record.
Try this: