Skip to content

Instantly share code, notes, and snippets.

@niisar
Created May 20, 2014 20:11
Show Gist options
  • Save niisar/2e8052f9761f92b6911b to your computer and use it in GitHub Desktop.
Save niisar/2e8052f9761f92b6911b to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment