I have table like this
id | serial_num | version | ..... 1 | 1 | 1 | ..... 2 | 2
Try this:
SELECT yourtable.* FROM yourtable WHERE (serial_num, version) in (select serial_num, max(version) from yourtable group by serial_num)
Subquery will return the maximum version for serial_num, so this will return all rows where serial_num has the maximum value. See this fiddle.