I have two tables, products and meta. They are in relation 1:N where each product row has at least one meta row via foreign key.
products
meta
(viz. SQLf
Use distinct on as suggested by @Craig's answer but combined with the order by clause as explicated in the comments. SQL Fiddle
distinct on
order by
select distinct on(m.product_id) * from meta m inner join products p on p.id = m.product_id order by m.product_id, m.id desc;