Question
Look at the query below: SELECT gender, semester_year AS year, semester_month AS month, SUM(num_of_students) AS total FROM instructor_summary GROUP BY gender, semester_year, semester_month; Now compare
Look at the query below: SELECT gender, semester_year AS year, semester_month AS month, SUM(num_of_students) AS total FROM instructor_summary GROUP BY gender, semester_year, semester_month; Now compare upper query to this one: SELECT gender, semester_year AS year, semester_month AS month, SUM(num_of_students) AS total FROM instructor_summary GROUP BY ROLLUP(gender, semester_year, semester_month); 1) How results will differ between these two queries? 2) What will change if we will replace ROLLUP with CUBE? 3) Rewrite the query to compute the following three result groups: (gender, semester_year), (semester_month) and ().
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started