Re: Selecting the most recent timestamptz

Поиск
Список
Период
Сортировка
От Alexander Farber
Тема Re: Selecting the most recent timestamptz
Дата
Msg-id CAADeyWgREH7Xv1OaTOC7BCi8dFcwZr3vQuzLmemtv1J8z1obRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Selecting the most recent timestamptz  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Selecting the most recent timestamptz  (Alexander Farber <alexander.farber@gmail.com>)
Список pgsql-general
Ahh, thank you Laurenz -

On Thu, Feb 22, 2018 at 10:18 AM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:

You are only checking if there is a later timestamp *for the same "mid"*.

Since the two rows have different "mid", they are not compared.

no it works -

# select m.played, m.mid, m.action, m.gid, m.uid from words_moves m where gid=10 and not exists (select 1 from words_moves x where m.gid=x.gid AND x.played > m.played);
            played             | mid | action | gid | uid
-------------------------------+-----+--------+-----+-----
 2018-02-20 15:06:01.430634+01 | 216 | expire |  10 |  11
(1 row)
 

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Selecting the most recent timestamptz
Следующее
От: Alexander Farber
Дата:
Сообщение: Re: Selecting the most recent timestamptz