Having a very hard time wrapping my head around how this should be written, I have a key made up of a fixed number column and an incrementing number column.
I want to have the select query only return the newest row for each fixed number.
For example:
20, 1
20, 2
20, 3 <-- Should only return these rows
25, 1
25, 2 <--
30, 1
30, 2
30, 3 <--
Is there to write this in a single query without having to iterate over the results in php?