Re: COUNT(Distinct city) HELP!!!

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Abe <abe(at)fish(dot)tm>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: COUNT(Distinct city) HELP!!!
Date: 2000-12-26 01:27:30
Message-ID: Pine.BSF.4.21.0012251727020.3738-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


I believe that functionality was added in version 7.0,
are you using an earlier version?

On Mon, 25 Dec 2000, Abe wrote:

> Hey there,
>
> I get this error but I think this is supposed to work:
>
> The table has some duplicates such as Munich I want the number of distinct cities:
>
> abenew=> select * from ct;
> name| age| city
> ---- +--- +------
> jow | 10| london
> tim | 15| paris
> kim | 17| munich
> te | 19| munich
> (8 rows)
>
> My query is as follows:
>
> tester => select count(distinct city) from ct;
> ERROR: parser: parse error at or near "distinct"
>
> Any guidance would be appreciated...
> Thanks
> Abe
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message GH 2000-12-26 02:08:24 Re: COUNT(Distinct city) HELP!!!
Previous Message mlw 2000-12-25 23:23:19 Re: COUNT(Distinct city) HELP!!!

Browse pgsql-hackers by date

  From Date Subject
Next Message Brent Verner 2000-12-26 02:01:06 Re: 7.1 on DEC/Alpha
Previous Message mlw 2000-12-25 23:26:51 Re: Upper limit on number of buffers?