I need to match rows from one table to another table that may or may not have a match on one common column.... the problem begins with bringing back the most recent row in the other table.
So, the query I'm starting with is:
SELECT * FROM data LEFT OUTER JOIN other ON (data.id=other.data_id)
This query works great except that I need to the most recent row in the "other" table, not all the rows where "data.id = other.data_id" matches.
So from that I tried to do this:
SELECT * FROM data LEFT OUTER JOIN other ON (data.id=other.data_id) GROUP BY data.id
However that brings the first row with "data.id = other.data_id" and not the most recent.