Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it? - Mailing list pgsql-general

From Gene Selkov, Jr.
Subject Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Date
Msg-id 199904281816.NAA03257@antares.mcs.anl.gov
Whole thread Raw
In response to Any ideas why this doesn't work or how to rewrite it?  (Aaron Holtz <aholtz@bright.net>)
Responses Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?  (Bob Dusek <bobd@palaver.net>)
List 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 by date:

Previous
From: Aaron Holtz
Date:
Subject: Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] UnixWare chokes