X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 59639475C26 for ; Tue, 25 Feb 2003 18:07:01 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 12427-03 for ; Tue, 25 Feb 2003 18:06:50 -0500 (EST) Received: from jester.inquent.com (unknown [216.208.117.7]) by postgresql.org (Postfix) with ESMTP id 03A574758BD for ; Tue, 25 Feb 2003 17:49:32 -0500 (EST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by jester.inquent.com (8.12.6/8.12.6) with ESMTP id h1PMo4uD085656; Tue, 25 Feb 2003 17:50:05 -0500 (EST) (envelope-from rbt@rbt.ca) Subject: Re: a change of query From: Rod Taylor To: James Cooper Cc: sql In-Reply-To: <004a01c2dd19$be6fe400$c900a8c0@jax> References: <004a01c2dd19$be6fe400$c900a8c0@jax> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uU2nVm3NjEPY7bW7KSU3" Organization: Message-Id: <1046213403.32353.50.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Feb 2003 17:50:04 -0500 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/566 X-Sequence-Number: 11964 --=-uU2nVm3NjEPY7bW7KSU3 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2003-02-25 at 17:03, James Cooper wrote: > select distinct cp.person_id from cluster_person cp, cluster c where > cp.cluster_id =3D c.cluster_id and c.c_id =3D 1 >=20 > can this query be changed to give just the row count?( of the distinct > rows ) :) So close select count(distinct cp.person_id) from... --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-uU2nVm3NjEPY7bW7KSU3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+W/Mb6DETLow6vwwRAnaKAJ9r2/F3dY+PT7k4l0TFPAprAgwmewCcDF8P bpArkOa5UNzsUg7YM5ePulk= =GTdM -----END PGP SIGNATURE----- --=-uU2nVm3NjEPY7bW7KSU3--