"Alex Page" <alex.page@solid-state-logic.com> writes:
> I'm trying to write a query that returns the rows containing the
> most recent values for each foreign key.
The best way to do this (on every dimension except portability :-()
is SELECT DISTINCT ON. See the weather-report example in the SELECT
reference page.
regards, tom lane