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

Re: DISTINCT and COUNT help

From: Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>
To: Julie Keywell <julie(at)iparenting(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: DISTINCT and COUNT help
Date: 2002-06-28 10:51:40
Message-ID: 20020628105140.13482.qmail@web40011.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Julie:

--- Julie Keywell <julie(at)iparenting(dot)com> wrote:
> Hi there!
> 
> I would like to count the number of distinct values
> in a column.  Is
> there any way to combine DISTINCT and COUNT and if
> so, what is the syntax?

try SELECT COUNT(DISTINCT(<column name>))
    FROM .....


ludwig


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



In response to

pgsql-novice by date

Next:From: Brian JohnsonDate: 2002-06-28 14:05:06
Subject: PostgreSQL setup on dual boot laptop
Previous:From: Aarni Ruuhimäki / Megative Tmi / KYMI.comDate: 2002-06-28 09:57:05
Subject: Parser function / command ?

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