Re: Picking out the most recent row using a time stamp column - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Picking out the most recent row using a time stamp column
Date
Msg-id 4D666A0F020000250003AFCE@gw.wicourts.gov
Whole thread Raw
In response to Re: Picking out the most recent row using a time stamp column  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: Picking out the most recent row using a time stamp column
List pgsql-performance
Michael Glaesemann <grzm@seespotcode.net> wrote:

> SELECT DISTINCT ON (data.id_key)
>        data.id_key, data.time_stamp, data.value
>   FROM data
>   ORDER BY data.id_key, data.time_stamp DESC;

Dang!  I forgot the DESC in my post!  Thanks for showing the
*correct* version.

-Kevin

pgsql-performance by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Picking out the most recent row using a time stamp column
Next
From: Dave Johansen
Date:
Subject: Pushing IN (subquery) down through UNION ALL?