Selecting table row with latest date

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Selecting table row with latest date
Дата
Msg-id alpine.LNX.2.20.2108190730510.15165@salmo.appl-ecosys.com
обсуждение исходный текст
Ответы Re: Selecting table row with latest date  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Selecting table row with latest date  (Rich Shepard <rshepard@appl-ecosys.com>)
Re: Selecting table row with latest date  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Selecting table row with latest date  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
I have a table of contacts (PK is the person_nbr and contact_date) and I
want to select only the row with the latest (most recent) contact_date. The
Comparison Date/Time sections in the postgres 12 doc doesn't appear to have
what I want, and when I try to use the max() aggregate function it throws an
error.

Please point me to the proper place in the docs where I can learn how to do
this.

Rich




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to detach a database
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Selecting table row with latest date