| От | Tom Lane |
|---|---|
| Тема | Re: [SQL] New count() question |
| Дата | |
| Msg-id | 10010.945643136@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | New count() question ("Mitch Vincent" <mitch@venux.net>) |
| Список | pgsql-sql |
"Mitch Vincent" <mitch@venux.net> writes:
> select count (*) as total from applicants as a,applicants_states as
> s,resume_search as re where a.app_id=s.app_id and a.app_id=re.app_id and
> re.user_id=291
> That's all well and fine except that it only counts the total from the
> applicants table, not the total from the rest of the query.
Er ... um ... what? The above will generate the count of the number of
joined tuples satisfying the WHERE condition. There is no "rest of the
query". I'm not following what you actually want to do, but evidently
this isn't it.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера