Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA53933 for ; Sun, 19 Dec 1999 17:39:34 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA10013; Sun, 19 Dec 1999 17:38:56 -0500 (EST) To: "Mitch Vincent" cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] New count() question In-reply-to: Your message of Sun, 19 Dec 1999 13:26:59 -0500 <014d01bf4a4e$a41e0ac0$0300000a@doot.org> Date: Sun, 19 Dec 1999 17:38:56 -0500 Message-ID: <10010.945643136@sss.pgh.pa.us> From: Tom Lane "Mitch Vincent" 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