pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Abe <abe@fish.tm>
To: Anand Raman <araman@india-today.com>
To: pgsql-general@postgresql.org
Subject: Re: COUNT(Distinct city) HELP!!!
Date: Tue, 26 Dec 2000 12:14:02 -0000
Message-ID: <000e01c06f35$567609a0$6500a8c0@win2k> (raw)
References: <001001c06ec8$36bec380$6500a8c0@win2k>
	<Pine.BSF.4.21.0012251727020.3738-100000@megazone23.bigpanda.com>
	<20001226121343.A683@india-today.com>

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

Thanks,
Abe


----- Original Message -----
From: "Anand Raman" <araman@india-today.com>
To: <pgsql-general@postgresql.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
> >>
>




view thread (8+ messages)

Message-ID: <000e01c06f35$567609a0$6500a8c0@win2k>
Permalink:  ../000e01c06f35$567609a0$6500a8c0@win2k/
Also on:    postgresql.org/message-id/000e01c06f35$567609a0$6500a8c0@win2k

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: abe@fish.tm, araman@india-today.com, pgsql-general@postgresql.org
  Subject: Re: COUNT(Distinct city) HELP!!!
  In-Reply-To: <000e01c06f35$567609a0$6500a8c0@win2k>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox