Re: [SQL] New count() question

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Rule Question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Rule Question