Re: count function alternative in postgres

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: count function alternative in postgres
Date: 2010-04-06 17:39:31
Message-ID: hpfrkh$skl$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

junaidmalik14 wrote on 03.04.2010 14:58:
>
> 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-functions.html#function_count-distinct
>
> Thanks

Your question has been answered several times already (including this list)

http://archives.postgresql.org/pgsql-hackers/2010-04/msg00182.php
http://archives.postgresql.org/pgsql-hackers/2010-04/msg00179.php
http://forums.devshed.com/postgresql-help-21/count-function-alternative-in-postgres-691450.html
http://www.dbforums.com/postgresql/1655165-count-function-alternative-postgres.html

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ben Morrow 2010-04-06 18:47:14 Re: count function alternative in postgres
Previous Message Lee Hachadoorian 2010-04-06 17:33:18 Table Design for Hierarchical Data