Re: a change of query

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: James Cooper <jim(at)luckydigital(dot)com>
Cc: sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: a change of query
Date: 2003-02-25 22:50:04
Message-ID: 1046213403.32353.50.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 = c.cluster_id and c.c_id = 1
>
> can this query be changed to give just the row count?( of the distinct
> rows )

:) So close

select count(distinct cp.person_id) from...

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-02-25 23:06:35 Re: Help with query involving aggregation and joining.
Previous Message Chad Thompson 2003-02-25 22:40:41 Re: a change of query