Re: SELECT DISTINCT and count(1) - Mailing list pgsql-novice

From A B
Subject Re: SELECT DISTINCT and count(1)
Date
Msg-id dbbf25900907160316t5289f23vf00609111e851930@mail.gmail.com
Whole thread Raw
In response to SELECT DISTINCT and count(1)  (A B <gentosaker@gmail.com>)
List pgsql-novice
Thank you both for both for your replies.

2009/7/16 Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de>:
> am 16.07.2009 11:57 Uhr schrieb A B unter gentosaker@gmail.com:
>
>> Hi.
>> I need to do a
>>
>> select distinct userid  from  usertable,<more tables>  where <conditions>;
>>
>> and then count the rows in the result
>>
>> How do I do that?
>
> Try:
>
> select count(distinct(userid))  from  usertable,<more tables>  where
> <conditions>;
>
> Best wishes from Berlin,
>
> Maximilian Tyrtania
>
>
>

pgsql-novice by date:

Previous
From: A B
Date:
Subject: SELECT DISTINCT and count(1)
Next
From: nobs@nobswolf.info (Emil Obermayr)
Date:
Subject: Re: SELECT DISTINCT and count(1)