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

RE: count(distinct col)

From: "Chau, Artemis" <artemis(dot)chau(at)intel(dot)com>
To: "'pgsql-novice(at)hub(dot)org'" <pgsql-novice(at)hub(dot)org>
Subject: RE: count(distinct col)
Date: 2000-08-01 22:07:36
Message-ID: A60B56F3D180D211AC3F00A0C96931DE047871B8@orsmsx48.jf.intel.com (view raw or flat)
Thread:
Lists: pgsql-novice
Runing 6.5.2, get Syntax error for the statement.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, August 01, 2000 5:00 PM
To: Chau, Artemis
Cc: 'pgsql-novice(at)hub(dot)org'
Subject: Re: [NOVICE] count(distinct col) 


"Chau, Artemis" <artemis(dot)chau(at)intel(dot)com> writes:
> What is the equivalent of 
> "select count(distinct col) from tbl" in PGSQL?

That's easy, "select count(distinct col) from tbl".

(If you're running 7.0 that is.  If not, why not?)

			regards, tom lane


pgsql-novice by date

Next:From: Wong, EdmondDate: 2000-08-01 22:09:19
Subject: Copy table to [stdout] using XML
Previous:From: Tom LaneDate: 2000-08-01 21:59:40
Subject: Re: count(distinct col)

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