Re: Can this be done in one query?

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: Can this be done in one query?
Дата
в 19:03:52
Msg-id
20020507154610.R79337-100000@megazone23.bigpanda.com
Ответ на
Список
Дерево обсуждения
Can this be done in one query? Randall Perry <rgp@systame.com>
Re: Can this be done in one query? Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Can this be done in one query? Randall Perry <rgp@systame.com>
Re: Can this be done in one query? Randall Perry <rgp@systame.com>

On Tue, 7 May 2002, Randall Perry wrote:

> With the following:
>
>     select max(date) from log order by date_time desc limit 12;
>
> The limit clause has no effect on the results; it'll get the latest date
> from the entire record set rather than from the last 12 records.

Maybe something like:
select max(date) from (select date from log order by date_time desc limit
12) c;

В списке pgsql-general по дате отправления
От: Samuel J. Sutjiono
Дата:
От: Steve Lane
Дата:
FAQ