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

From K.T.
Subject Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Date
Msg-id 011701be9197$25c04780$3e9264d1@p2-400-death
Whole thread Raw
Responses Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?  (Aaron Holtz <aholtz@bright.net>)
List pgsql-general
I believe its:
    select DISTINCT count(*) from customerdata;

of course you are welcome to replace the "*" with a field name, but why
bother typing all those extra keystrokes :)

-----Original Message-----
From: Aaron Holtz <aholtz@bright.net>
To: pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
Date: Wednesday, April 28, 1999 10:44 AM
Subject: [GENERAL] Any ideas why this doesn't work or how to rewrite it?


>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?  I can always
>just count the number of tuples returned but this seemed to be a valid
>query.
>
>--------------------------------------------------------------------------
>Aaron Holtz
>ComNet Inc.
>UNIX Systems Specialist
>Email:  aholtz@bright.net
>"It's not broken, it just lacks duct tape."
>--------------------------------------------------------------------------
>
>
>





pgsql-general by date:

Previous
From: "K.T."
Date:
Subject: Re: [GENERAL] Why are my index files are much larger than mydatafiles
Next
From: bachir ramdani
Date:
Subject: