given a table with these fields:
dealer char()
revenue float()
vdate date
now:
select dealer, sum(revenue)
from table
group by dealer
and also:
select dealer, sum(revenue)
from table where date_part('month', vdate) = 1
group by dealer
work fine.
But instead of one column with the whole revenue (first example) or the renvenue of one month
(second example) I would like to have a column for each month. is this possible within one select
statement?
TIA
Harald
--
Harald Lux lux@lux.de
Sandkaule 5-7 Tel.: +49 228 692325
D-53111 Bonn http://www.lux.de/