X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 57324475D0D for ; Tue, 25 Feb 2003 18:04:23 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 11536-04 for ; Tue, 25 Feb 2003 18:03:54 -0500 (EST) Received: from boromir.vpop.net (dns1.vpop.net [207.178.248.2]) by postgresql.org (Postfix) with ESMTP id 40E9A475C60 for ; Tue, 25 Feb 2003 17:39:20 -0500 (EST) Received: from c5cust187.starstream.net (c5cust187.starstream.net [206.170.161.187]) by boromir.vpop.net (Postfix) with ESMTP id 9D0203A610B; Tue, 25 Feb 2003 14:39:14 -0800 (PST) Subject: Re: a change of query From: Brad Hilton To: James Cooper Cc: sql In-Reply-To: <004a01c2dd19$be6fe400$c900a8c0@jax> References: <004a01c2dd19$be6fe400$c900a8c0@jax> Content-Type: text/plain Organization: Message-Id: <1046212757.15608.3.camel@aragorn.vpop.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Feb 2003 14:39:17 -0800 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/565 X-Sequence-Number: 11963 On Tue, 2003-02-25 at 14:03, James Cooper wrote: > select distinct cp.person_id from cluster_person cp, cluster c where > cp.cluster_id = c.cluster_id and c.c_id = 1 > > can this query be changed to give just the row count?( of the distinct > rows ) select count(distinct cp.person_id) from ... Is that what you were after? Brad Hilton VPOP Technologies, Inc.