RE: COUNT DISTINCT

Поиск
Список
Период
Сортировка
От Eric Jain
Тема RE: COUNT DISTINCT
Дата
Msg-id NCBBJFHBEGOIAHBCBNCLEEFCCJAA.jain@gmx.net
обсуждение исходный текст
Ответ на Re: COUNT DISTINCT  (Andrew McMillan <Andrew@catalyst.net.nz>)
Ответы RE: COUNT DISTINCT  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: pg_dump with BLOBS & V7.0.2 UPDATED
Следующее
От: Stephan Szabo
Дата:
Сообщение: RE: COUNT DISTINCT