Re: [HACKERS] SELECT COUNT(DISTINCT)

From: Andy Selle <aselle(at)earth(dot)mat(dot)net>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] SELECT COUNT(DISTINCT)
Date: 1999-02-22 13:46:09
Message-ID: Pine.BSI.3.95.990222084446.15654A-100000@earth.mat.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was in need of that exact feature awhile back. As far as I can tell it
isn't supported. I ended up using a complicated NOT EXISTS query instead.
I've been meaning to hack this, but I haven't gotten a chance.

-Andy

On Mon, 22 Feb 1999, Oleg Broytmann wrote:

> Hello!
>
> I am trying to execute query:
> SELECT city_id, COUNT(DISTINCT pos_id)
> ...
> GROUP BY city_id ;
>
> but got the error:
> ERROR: parser: parse error at or near "distinct"
>
> It is me who do not understand SQL or postgres does not implement it?
>
> Oleg.
> ----
> Oleg Broytmann http://members.xoom.com/phd2/ phd2(at)earthling(dot)net
> Programmers don't die, they just GOSUB without RETURN.
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1999-02-22 14:09:08 Re: [HACKERS] inet data type regression test fails
Previous Message jose' soares 1999-02-22 13:44:34 Re: [HACKERS] lower() broken?