I've got two tables (let's say "left" and "right" tables). The right table's got from none to several rows matching each row on the left table.
I need to perform a query where I can join the two tables the same way a LEFT OUTER JOIN works, but getting only one row for each existing one in the left table. That row should be the one corresponding to the highest id on the right table.
A NATURAL JOIN would work, but I won't be getting the rows from the left table that don't match any row on the right one.