Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?

Поиск
Список
Период
Сортировка
От Gene Selkov, Jr.
Тема Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Дата
Msg-id 199904281816.NAA03257@antares.mcs.anl.gov
обсуждение исходный текст
Ответ на Any ideas why this doesn't work or how to rewrite it?  (Aaron Holtz <aholtz@bright.net>)
Ответы Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?  (Bob Dusek <bobd@palaver.net>)
Список pgsql-general
> This seems like a simple SQL command, but I'm getting errors.
> Running 6.5.0 under RedHat 5.2:
>
> db=> select count(distinct customer_username) from customerdata;
> ERROR:  parser: parse error at or near "distinct"
>
> How do you get a count of distinct data output via postgres?

SELECT customer_username, COUNT(customer_username) FROM customerdata GROUP BY customer_username;

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

Предыдущее
От: Aaron Holtz
Дата:
Сообщение: Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] UnixWare chokes