Re: COUNT(Distinct city) HELP!!!

Поиск
Список
Период
Сортировка
От GH
Тема Re: COUNT(Distinct city) HELP!!!
Дата
Msg-id 20001225200824.A30984@over-yonder.net
обсуждение исходный текст
Ответ на COUNT(Distinct city) HELP!!!  ("Abe" <abe@fish.tm>)
Список pgsql-general
On Mon, Dec 25, 2000 at 11:12:50PM -0000, some SMTP stream spewed forth:
> Hey there,
>
> I get this error but I think this is supposed to work:

Hrm, it works here on 7.0.2 where each field is "text".

=> select version();
                             version
-----------------------------------------------------------------
 PostgreSQL 7.0.2 on i386-unknown-freebsdelf4.0, compiled by cc
(1 row)


I wish that I could actually *help* you, but I can not. ;-(

G'luck.

gh

>
> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: COUNT(Distinct city) HELP!!!
Следующее
От: Anand Raman
Дата:
Сообщение: Re: COUNT(Distinct city) HELP!!!