Re: COUNT DISTINCT

From: "Len Morgan" <len-morgan(at)crcom(dot)net>
To: "Andrew McMillan" <Andrew(at)catalyst(dot)net(dot)nz>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: COUNT DISTINCT
Date: 2000-07-15 14:29:17
Message-ID: 01ea01bfee69$15222800$0908a8c0@H233.bstx.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think what you are really looking for is a GROUPing:

SELECT url,id,count(*) FROM log GROUP BY url,id ;

The number of records returned is the NUMBER if different url/id pairs. The
value of count(*) in each record is the count
for that particular pair. Hope this helps

len morgan

Browse pgsql-general by date

  From Date Subject
Next Message Denis Perchine 2000-07-15 15:21:52 Patch do allow postfix use PostgreSQL as a map.
Previous Message Jesus Aneiros 2000-07-15 11:19:07 Re: Re: Postgresql and Postmaster response