Any ideas why this doesn't work or how to rewrite it?

From: Aaron Holtz <aholtz(at)bright(dot)net>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Any ideas why this doesn't work or how to rewrite it?
Date: 1999-04-28 15:50:36
Message-ID: Pine.LNX.4.10.9904281144550.3587-100000@barbarossa.bright.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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? 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 Wim Ceulemans 1999-04-28 15:58:35 Search engine with PostgreSQL
Previous Message Jim Mercer 1999-04-28 15:27:44 Re: [GENERAL] PLpgSQL Stat Problem