Re: COUNT DISTINCT - Mailing list pgsql-general

From Len Morgan
Subject Re: COUNT DISTINCT
Date
Msg-id 01ea01bfee69$15222800$0908a8c0@H233.bstx.cc
Whole thread Raw
In response to COUNT DISTINCT  ("Eric Jain" <jain@gmx.net>)
List 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


pgsql-general by date:

Previous
From: Jesus Aneiros
Date:
Subject: Re: Re: Postgresql and Postmaster response
Next
From: Denis Perchine
Date:
Subject: Patch do allow postfix use PostgreSQL as a map.