in reply to MySQL question
Well if it is right, all what you need is to change your ORDER BY, for a GROUP by.+-------+---------+---------+ | title | doc_num | version | +-------+---------+---------+ | bar | 1234 | 9 | | foo | 1234 | 7 | | other | 2121 | 7 | +-------+---------+---------+
SELECT title, doc_num, MAX(version) AS version from test GROUP BY titl +e; # For this example "test" is the table name
|
---|