Yes, I'm just taking the value ntuples returned after doing:
select distinct customer_username from customerdata group by
customer_username;
I guess my big thing was that I saw a couple of
select count(distinct something) from table;
examples in an SQL book that I have. Was just curious as to whether psql
didn't support this type of command or decided that a better way existed
to write the query. Thanks to all for the thoughts and ideas. Maybe this
support will be added at some juncture.
--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
UNIX Systems Specialist
Email: [EMAIL PROTECTED]
"It's not broken, it just lacks duct tape."
--------------------------------------------------------------------------
On Wed, 28 Apr 1999, Bob Dusek wrote:
>Hey there...
>
>> SELECT customer_username, COUNT(customer_username) FROM customerdata GROUP BY
>customer_username;
>>
>
>The above query, in effect, does the same thing that:
>
>SELECT DISTINCT(customer_username) from customerdata
>
>does. In order to get the total number of distinct customer_usernames,
>you would still have to count the rows returned (which is easily
>enough done with PHP $count = pg_NumRows($query_result)).
>
>My guess is that SELECT DISTINCT might even be a bit quicker...?? (gurus)
>
>>
>
>Bob
>