Question: Database technologies 1. Implement a ROLLUP operation as a SQL stored procedure. Given a list of attributes, ROLLUP uses GROUP BY by successively omitting last
1. Implement a ROLLUP operation as a SQL stored procedure. Given a list of attributes, ROLLUP uses GROUP BY
by successively omitting last column from the GROUP BY specification. For example, if the list of attributes in the GROUP BY clause is (year, month, date) then ROLLUP will generate GROUP BY based on ((year, month,date), (year, month), (year), O). Your stored procedure should work for a maximum of 5 attributes, any input higher than 5 must mention that ROLLUP is limited to 5 attributes. (1.5%) 2. The ROLLUP key word offers solutions wherea hierarchical point of view is adequate. But in data warehouse applications one likes to navigate freely through the aggregated data, noft only from top to bottom. Implement a CUBE
operation as a SQL stored procedure. Given a list of attributes, CUBE generates GROUP BY
on all possible combinations of the grouping attributes. For example, if the list of attributes is (year, month, date) then CUBE will generate GROUP BY based on ((year, month,date), (year, month), (year, date), (month, date), (year), (month), (date), 0), Your stored procedure should work for a maximum of 5 attributes, any input higher than 10 must say that CUBE is limited to 5 attributes. (1.5%) 1. Implement a ROLLUP
operation as a SQL stored procedure. Given a list of attributes, ROLLUP uses GROUP BY
by successively omitting last column from the GROUP BY specification. For example, if the list of attributes in the GROUP BY clause is (year, month, date) then ROLLUP will generate GROUP BY based on ((year, month,date), (year, month), (year), O). Your stored procedure should work for a maximum of 5 attributes, any input higher than 5 must mention that ROLLUP is limited to 5 attributes. (1.5%) 2. The ROLLUP key word offers solutions wherea hierarchical point of view is adequate. But in data warehouse applications one likes to navigate freely through the aggregated data, noft only from top to bottom. Implement a CUBE
operation as a SQL stored procedure. Given a list of attributes, CUBE generates GROUP BY
on all possible combinations of the grouping attributes. For example, if the list of attributes is (year, month, date) then CUBE will generate GROUP BY based on ((year, month,date), (year, month), (year, date), (month, date), (year), (month), (date), 0), Your stored procedure should work for a maximum of 5 attributes, any input higher than 10 must say that CUBE is limited to 5 attributes. (1.5%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
