John Taylor <postgres(at)jtresponse(dot)co(dot)uk> writes:
> I want to return 1 row for each id, that contains the maximum update
> value for that id, and the values for name and desc.
There's no simple way to do that in standard SQL. However you can do
it easily with SELECT DISTINCT ON, if you don't mind using a nonstandard
construct. See the "weather report" example on the SELECT reference
page.
regards, tom lane