RE: COUNT DISTINCT - Mailing list pgsql-general

From Eric Jain
Subject RE: COUNT DISTINCT
Date
Msg-id NCBBJFHBEGOIAHBCBNCLEEFCCJAA.jain@gmx.net
Whole thread Raw
In response to Re: COUNT DISTINCT  (Andrew McMillan <Andrew@catalyst.net.nz>)
Responses RE: COUNT DISTINCT
List pgsql-general
> > SELECT count(DISTINCT url) FROM log; does work. The problem is to
> > extend the DISTINCT over several fields...
>
> Right - I should have looked closer shouldn't I :-)
>
> What about...
>
> advert=# select count( distinct ( (text(advert_no) ||
> text(pool_id)) ) )
> from redirect;

Good idea! Unfortunatly this ignores all rows with NULL in either of
the fields...

I guess if I'm a bit patient one day pgsql will allow for something
like:

SELECT COUNT(SELECT DISTINCT url,id FROM log) FROM log;


--
Eric Jain


pgsql-general by date:

Previous
From: Philip Warner
Date:
Subject: pg_dump with BLOBS & V7.0.2 UPDATED
Next
From: Stephan Szabo
Date:
Subject: RE: COUNT DISTINCT