niisar
5/20/2014 - 8:11 PM

Create the all combinations of data using the variables ,

Create the all combinations of data using the variables ,

select SURVEY_YEAR,
       candybar_name,
       gender,
       overall_rating,
       sum(number_bars_consumed) as total_bars_consumed
from candybar_consumption_data
group by cube(SURVEY_YEAR,CANDYBAR_NAME,GENDER,OVERALL_RATING)