Re: Picking out the most recent row using a time stamp column

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Picking out the most recent row using a time stamp column
Дата
Msg-id 4D666A0F020000250003AFCE@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Picking out the most recent row using a time stamp column  (Michael Glaesemann <grzm@seespotcode.net>)
Ответы Re: Picking out the most recent row using a time stamp column  (Dave Crooke <dcrooke@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Picking out the most recent row using a time stamp column
Следующее
От: Dave Johansen
Дата:
Сообщение: Pushing IN (subquery) down through UNION ALL?