Re: count( distinct x )

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anthony <lists(at)a1(dot)org(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: count( distinct x )
Date: 2000-11-27 19:10:24
Message-ID: 11661.975352224@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Anthony 2000-11-27 19:20:01 Re: count( distinct x )
Previous Message Anthony 2000-11-27 19:07:25 Re: count( distinct x )