Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA26528; Thu, 18 Mar 93 01:52:06 -0800
Message-Id: <9303180952.AA26528@postgres.Berkeley.EDU>
From: Peter van Oosterom <Peter.van.Oosterom@fel.tno.nl>
Subject: counting combinations (2)
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: postgres@postgres.Berkeley.EDU
Date: Thu, 18 Mar 93 10:51:52 MET
X-Mailer: ELM [version 2.3 PL11]

Dear Postgres-group,

A couple of days ago, I posed the following question:

> I want to count combinations of attribute values.
> For example in relation X:
>    a    b
>    3    6
>    2    4
>    3    8
> I would like to obtain the following result Y:
>    a    number_of_b
>    3    2
>    2    1
> Is this possible in Postquel?

Until now I got one reply for solving this problem in SQL:
     select a, count(distinct b)
     from X
     group by a

Is something like this also possible in Postquel

Kind regards, Peter van Oosterom.
