Re: COUNT(Distinct city) HELP!!!

From: "Abe" <abe(at)fish(dot)tm>
To: "Anand Raman" <araman(at)india-today(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: COUNT(Distinct city) HELP!!!
Date: 2000-12-26 12:14:02
Message-ID: 000e01c06f35$567609a0$6500a8c0@win2k
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

No Joy,
unfortunately - It may well be time to upgrade.

Thanks,
Abe

----- Original Message -----
From: "Anand Raman" <araman(at)india-today(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, December 26, 2000 6:43 AM
Subject: Re: [GENERAL] COUNT(Distinct city) HELP!!!

> or u can also try
>
> select count(*)
> from
> (select distinct city from ct);
>
> Hope this helps
> Anand
>
> On Mon, Dec 25, 2000 at 05:27:30PM -0800, Stephan Szabo wrote:
> >
> >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

Browse pgsql-general by date

  From Date Subject
Next Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2000-12-26 12:43:11 Re: red hat/mysql fiasco
Previous Message Anand Raman 2000-12-26 06:43:43 Re: COUNT(Distinct city) HELP!!!

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-12-26 16:26:14 Tuple-valued datums on Alpha (was Re: 7.1 on DEC/Alpha)
Previous Message Anand Raman 2000-12-26 06:43:43 Re: COUNT(Distinct city) HELP!!!