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

From: "K(dot)T(dot)" <death(at)solaris1(dot)mysolution(dot)com>
To: "Aaron Holtz" <aholtz(at)bright(dot)net>, <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Date: 1999-04-28 16:49:55
Message-ID: 011701be9197$25c04780$3e9264d1@p2-400-death
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bright(dot)net>
To: pgsql-general(at)postgreSQL(dot)org <pgsql-general(at)postgreSQL(dot)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(at)bright(dot)net
>"It's not broken, it just lacks duct tape."
>--------------------------------------------------------------------------
>
>
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron Holtz 1999-04-28 17:07:37 Re: [GENERAL] Any ideas why this doesn't work or how to rewrite it?
Previous Message Kevin Lo 1999-04-28 16:42:48 Re: [GENERAL] Search engine with PostgreSQL