Skip site navigation (1) Skip section navigation (2)

Re: count( distinct x )

From: Anthony <lists(at)a1(dot)org(dot)uk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: count( distinct x )
Date: 2000-11-27 19:20:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Tom Lane wrote:

> Anthony <lists(at)a1(dot)org(dot)uk> writes:
> >     select count( distinct area ) from areapostcode where postcode like
> > 'BS1%'
> > the above statement fails with
> >     ERROR:  parser: parse error at or near "distinct"
> What Postgres version are you running?  Support for count(distinct foo)
> was added in 7.0, IIRC.
>                         regards, tom lane

select version();
PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
(1 row)


any ideas how to get same result at relative speed with different query?

Thanks Tom.

In response to

pgsql-sql by date

Next:From: Bernie HuangDate: 2000-11-27 19:22:45
Subject: a script that queries database periodically
Previous:From: Tom LaneDate: 2000-11-27 19:10:24
Subject: Re: count( distinct x )

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group