| От | G. Anthony Reina |
|---|---|
| Тема | SELECT query |
| Дата | |
| Msg-id | 3AAFC2F1.AEEAAFB2@nsi.edu обсуждение исходный текст |
| Ответы |
Re: SELECT query
|
| Список | pgsql-novice |
I can't figure out how to make the following query: Table = circles_proc subject text, arm char, rep int, cycle int I'd like to find the unique subject, arm, and rep tuples where the rep has exactly 5 cycles associated with it. I think it would be something like: select distinct subject, arm, rep from circles_proc where rep = (select rep from circles_proc where 5 = count(cycle)); but the count is going to be performed over all tuples returned. I'd like to have the count performed over each rep and just find the reps where there are 5 cycles. Can someone help? Thanks. -Tony
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера