Re: limit based on count(*)

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: limit based on count(*)
Дата
Msg-id CAF-3MvOmSQwZgE2J+_x8n10ys7sXzy26DZ1w69CTCejzcN7QCA@mail.gmail.com
обсуждение исходный текст
Ответ на limit based on count(*)  (Steve Clark <sclark@netwolves.com>)
Ответы Re: limit based on count(*)  (Russell Keane <Russell.Keane@inps.co.uk>)
Список pgsql-general
On 22 February 2013 17:01, Steve Clark <sclark@netwolves.com> wrote:

> select serial_no, count(*) as "restarts" from event_log where event_mesg
> ilike 'system sta%' and event_date > current_date - 7
> group by serial_no order by restarts
>


select serial_no, count(*) as "restarts" from event_log where event_mesg
ilike 'system sta%' and event_date > current_date - 7
group by serial_no
having count(*) > X
order by restarts

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Access a window's frame_end row from a window function
Следующее
От: Russell Keane
Дата:
Сообщение: Re: limit based on count(*)