| От | Steve Clark |
|---|---|
| Тема | limit based on count(*) |
| Дата | |
| Msg-id | 51279648.4080805@netwolves.com обсуждение исходный текст |
| Ответы |
Re: limit based on count(*)
Re: limit based on count(*) |
| Список | pgsql-general |
Hello List, I have a query that counts how many time an event occurs in our event_log these are grouped by the serial number of the device that created the event. I would like to show only the rows where the number of events exceeds some threshold. simplified query: 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; So what I would like to see is only the serial_nos that had more than X restarts. Any ideas would be appreciated. -- Stephen Clark
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера