SQL problem with aggregate functions. - Mailing list pgsql-sql

From David BOURIAUD
Subject SQL problem with aggregate functions.
Date
Msg-id 200207091036.17913.david.bouriaud@ac-rouen.fr
Whole thread Raw
Responses Re: SQL problem with aggregate functions.  (Christoph Haller <ch@rodos.fzk.de>)
Re: SQL problem with aggregate functions.  (Hubert depesz Lubaczewski <depesz@depesz.pl>)
List pgsql-sql
Hi the list !
I've got a table in which there is a field that can have one amongst 3 
possible values : D, R, X. Is it possible to get in one query the count of 
this different values.Please, note that I don't want to have a querry like 
this :
"select count (*) from tab group by f1;", cause i want to get all the possible 
count values in one row (these data are already grouped on another field).
To give a more accurate example, here is what I want to retrieve :

Field group | count of D | count of R | count of X.

Any clues ?
-- 
David BOURIAUD
----------------------------------------------------------
In a world without walls or fences, what use do we have 
for windows or gates ?
----------------------------------------------------------
ICQ#102562021





pgsql-sql by date:

Previous
From: Joseph Syjuco
Date:
Subject: export plpgsql function to file
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: newbie question