count(distinct col)

Поиск
Список
Период
Сортировка
Искать

count(distinct col)

От:
"Chau, Artemis" <artemis.chau@intel.com>
Дата:
What is the equivalent of 

"select count(distinct col) from tbl" in PGSQL?

Re: count(distinct col)

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Chau, Artemis"  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

RE: count(distinct col)

От:
"Chau, Artemis" <artemis.chau@intel.com>
Дата:
Runing 6.5.2, get Syntax error for the statement.

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


"Chau, Artemis"  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

FAQ