Re: using window-functions to get freshest value - how?

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: using window-functions to get freshest value - how?
Дата
Msg-id bddc86150911200422r3a9d2485jd8c1b9f43e1598e9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: using window-functions to get freshest value - how?  (silly8888 <silly8888@gmail.com>)
Список pgsql-general
2009/11/20 silly8888 <silly8888@gmail.com>
> and how would I use DISTINCT ON for this query? Please bear in mind,
> that there is more then one id_bf (just stopped the sample data with
> one of them)

I posted the answer more than hour ago:

SELECT DISTINCT ON (id_rf) * FROM rfmitzeit ORDER BY id_rf,
letztespeicherung DESC;


Ah yes, I mixed up the id_rf and id_bf.  Yeah, this is what I would use (although I personally avoid using *).

Thom

В списке pgsql-general по дате отправления:

Предыдущее
От: silly8888
Дата:
Сообщение: Re: using window-functions to get freshest value - how?
Следующее
От: "Massa, Harald Armin"
Дата:
Сообщение: Re: using window-functions to get freshest value - how?