pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brad Hilton <bhilton@vpop.net>
To: James Cooper <jim@luckydigital.com>
Cc: sql <pgsql-sql@postgresql.org>
Subject: Re: a change of query
Date: 25 Feb 2003 14:39:17 -0800
Message-ID: <1046212757.15608.3.camel@aragorn.vpop.net> (raw)
In-Reply-To: <004a01c2dd19$be6fe400$c900a8c0@jax>
References: <004a01c2dd19$be6fe400$c900a8c0@jax>

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.




view thread (4+ messages)  latest in thread

Message-ID: <1046212757.15608.3.camel@aragorn.vpop.net>
Permalink:  ../1046212757.15608.3.camel@aragorn.vpop.net/
Also on:    postgresql.org/message-id/1046212757.15608.3.camel@aragorn.vpop.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bhilton@vpop.net, jim@luckydigital.com
  Subject: Re: a change of query
  In-Reply-To: <1046212757.15608.3.camel@aragorn.vpop.net>

* 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