From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mitch Vincent <mitch@venux.net>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] New count() question
Date: Sun, 19 Dec 1999 17:38:56 -0500
Message-ID: <10010.945643136@sss.pgh.pa.us> (raw)
In-Reply-To: <014d01bf4a4e$a41e0ac0$0300000a@doot.org>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mitch@venux.net
Subject: Re: [SQL] New count() question
In-Reply-To: <10010.945643136@sss.pgh.pa.us>
References: <014d01bf4a4e$a41e0ac0$0300000a@doot.org> <10010.945643136@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox