Re: [SQL] New count() question - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] New count() question
Date
Msg-id 10010.945643136@sss.pgh.pa.us
Whole thread Raw
In response to New count() question  ("Mitch Vincent" <mitch@venux.net>)
List 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 by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Rule Question
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Rule Question