Joseph Shraibman <[EMAIL PROTECTED]> writes:
> Bascially the point of the subselect is to get the field value where
> serial is hightest and the two keys match.

If you don't mind nonstandard SQL, perhaps something involving SELECT
DISTINCT ON would solve your problem (look at the weather-report example
on the SELECT reference page for inspiration).  But I'm still pretty
fuzzy on what the table layout is and why this computation makes any
sense.  Maybe the real answer is to back up a few steps and reconsider
your table design.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to