i am trying to aggregate two columns in my result table but I can't get my head around it... I have a star schema and the following query:
select 1und1.SubCategory,count(industry_facts.NACE_ID), statistics_2016.businesses
from industry_facts, 1und1, statistics_2016
where 1und1.NACE_ID = industry_facts.NACE_ID
and statistics_2016.Stat_ID = industry_facts.Stat_ID
group by 1und1.SubCategory ASC, statistics_2016.businesses
The result table give back the correct results but in this style:
This is the Schema:
I can't figure out a way to aggregate it per SubCategory...So that it looks like Accomodation, 660, 1004390
Tried it with rollup at the and of the group by clause, but that only aggregates the 2nd column, the 3rd always gives back "NULL"
Do you have any ideas? Help is much appreciated!