| От | Condor |
|---|---|
| Тема | Result from Having count |
| Дата | |
| Msg-id | d36f1787f53cc2fdafe614ada46437e8@stz-bg.com обсуждение исходный текст |
| Ответы |
Re: Result from Having count
|
| Список | pgsql-general |
Hello ppl, I try to make query and see how many ids have more then one row. few records is: ids | val | some a | 1 | x a | 1 | v b | 1 | x b | 2 | c I focus on ids and val with: SELECT ids, val FROM table WHERE ids = 'a' GROUP BY ids, val HAVING COUNT(ids) > 1; and result is: ids | val a | 1 Well in this condition pgsql shold not return me positive result because on documentation I read having count work on group clause, and when I group these two records based on ids = 'a' they become to one row and my condition is if the result after grouping is greeter then 1. I use postgresql 9.1.4 x64 Any one can tell me what I miss ? Regards, Hristo Simeonov
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера