2010/4/5 Kevin Grittner :
> Robert Haas wrote:
>
>> You can do:
>>
>> SELECT COUNT(*) FROM (SELECT DISTINCT profile.id, profile.name,
>> profile.age FROM ...) x;
>
> Ah, I see what they wanted now. In older versions of PostgreSQL,
> they might get better performance in some cases by using GROUP B
Robert Haas wrote:
> You can do:
>
> SELECT COUNT(*) FROM (SELECT DISTINCT profile.id, profile.name,
> profile.age FROM ...) x;
Ah, I see what they wanted now. In older versions of PostgreSQL,
they might get better performance in some cases by using GROUP BY:
SELECT COUNT(*) FROM
(SELECT
On Sat, Apr 3, 2010 at 8:59 AM, junaidmalik14 wrote:
>
> Is there any alternative of mysql function COUNT(DISTINCT expr,[expr...]) in
> postgres. We get error if we
>
> write count like this count(distinct profile.id, profile.name, profile.age)
> but it works well in mysql.
>
> Reference url is gi
junaidmalik14 wrote:
> Is there any alternative of mysql function COUNT(DISTINCT
> expr,[expr...]) in postgres. We get error if we write count like
> this count(distinct profile.id, profile.name, profile.age)
Is that semantically different from this SQL standard syntax?:
SELECT profile.id, p
Is there any alternative of mysql function COUNT(DISTINCT expr,[expr...]) in
postgres. We get error if we
write count like this count(distinct profile.id, profile.name, profile.age)
but it works well in mysql.
Reference url is given below
http://dev.mysql.com/doc/refman/5.1/en/group-by-functi