Re: SELECT syntax question - combining COUNT and DISTINCT

From: zmilos(at)sympatico(dot)ca (zhix)
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: SELECT syntax question - combining COUNT and DISTINCT
Date: 2003-10-07 02:51:51
Message-ID: c59f4459.0310061851.6d5f9e1a@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

This should do:

select pdb_id,count(*)
from chain
where chain_id = 'A'
group by pdb_id;

rgds,
zhix

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2003-10-07 04:17:39 Re: Getting "connectby" installed
Previous Message zhix 2003-10-07 00:38:25 Re: SELECT syntax question - combining COUNT and DISTINCT