Grouping by large number of columns
I have been charged with changing an existing Birt Report.
It is a summary report that previously gathered all of its data from a single data source. Therefore, all grouping was done on the Oracle side of the equation.
The resulting data set has LOTS of columns (15 more than my example below) by which it is grouped only 2 summed columns. So the layout was essentially a detail report of summary data. For example:
select
super,
ent,
acct,
campaign,
subcampaign,
sum(count) as "count",
sum(duration) as "duration"
from DataTable1 d1, DataTable2 d2
where d1.id = d2.id
group by
super,
ent,
acct,
campaign,
subcampaign
Now I have two data sets because of different connections for the two tables:
select
id,
super,
ent,
acct,
campaign,
subcampaign,
from DataTable1 d1
AND
select
id
count as "count",
duration as "duration"
from DataTable2 d2
So I now have to create a joint data set at the row level on id's and I've done this.
However, nowe I need to group on super, ent, acct, campaign, subcampaign in the report.
A cross tab seems to only handle two group by columns, one for the X-axis and another for the Y-axis.
What is the best way to approach this problem?