select max(id) from table where order = 2