Re: count( distinct x )

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: count( distinct x )
Дата
Msg-id 12318.975358773@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: count( distinct x )  (Anthony <lists@a1.org.uk>)
Список pgsql-sql
Anthony <lists@a1.org.uk> writes:
> I think it's time to get Mr. Sysadmin to upgrade to v7 ;)

That's a good idea on many grounds, not only this one ;-)

However, if you really need a 6.5.* solution, you could do
SELECT DISTINCT foo INTO TEMP TABLE mytemp FROM ...SELECT COUNT(*) FROM mytemp;DROP TABLE mytemp;
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Serge Canizares
Дата:
Сообщение: Re: a script that queries database periodically
Следующее
От: "Poul L. Christiansen"
Дата:
Сообщение: Re: a script that queries database periodically