+-------+---------+---------+ | 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 title; # For this example "test" is the table name