I have a special ID column in a MySQL database. Some of the rows have the same special ids. Is there a way, when I’m selecting data, to specify if I’ve already grabbed a row with that special id to ignore the next row with that same special id?
Share
You haven’t give us much to go on (such as schema, sample inputs, expected outputs etc), however, what you seek might entail something akin to:
In this scenario, I’m arbitrarily chosing the lowest Primary Key value for each of the SpecialId values.