Re: Counting unique rows as an aggregate.

From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: r_musta <zepolen(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Counting unique rows as an aggregate.
Date: 2008-09-30 05:04:58
Message-ID: 396486430809292204o2879fe51o8056e8aa1b9a1a84@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 29, 2008 at 4:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> SELECT count(distinct make), count(distinct color) from table WHERE >criteria<;

Is this in the SQL spec? I didn't know Agg functions could do this?

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Klint Gore 2008-09-30 05:42:54 Re: Counting unique rows as an aggregate.
Previous Message Abdul Rahman 2008-09-30 04:55:24 Re: Replication using slony-I