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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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