Subject | Subquery Question (FB 1.5) |
---|---|
Author | data.inspector |
Post date | 2010-07-07T03:13:54Z |
I have a table with three columns "Well ID" "Date" and "Comment". I am trying to find the most recent "Comment" for each "Well ID" using a subquery that retrieves the "Well ID" and Max ("Date"). My subquery gets the Well ID and the max date, but I just can't figure out how to use that information to get the "Comment" based on those results. I am using some books on SQL as a guide, but I'm never sure if I have the syntax wrong, or if Firebird 1.5 doesn't support the same syntax.
Is there a good resource out there that describes these sorts of queries?
Is there a good resource out there that describes these sorts of queries?