I have made few projects (CMS and EC system) that required to have some data versioned.
Usually I come with that kind of schema
+--------------+ +
If you had used Oracle you could use analytic functions
select * from ( SELECT a.* , row_number() over (partition by foobar_id order by version desc) rn FROM foobar a WHERE foobar_id = 2 ) where rn = 1