What version are you using?  I believe this was added in 7.0.x, but
I could be wrong about that.  A query of this sort works on my 
7.1beta3 system.

On 17 Jan 2001, Mikael Hedin wrote:
> I have a table with a column (int4), and I want to know how many
> different numbers there are.  In an example book I saw the query
> 
> SELECT COUNT (DISTINCT data ) FROM media;
> 
> by then I get 
> 
> ERROR:  parser: parse error at or near "distinct"
> 
> Is the query in error or does PostgreSQL not support this?  How do I
> then get the number of distinct data from my table?

Reply via email to