Question: Python code Experiment on ROLLUP and CUBE operations 1 . You are given the following table. Write a python code to calculate SUM of PROFIT

Python code Experiment on ROLLUP and CUBE operations
1. You are given the following table. Write a python code to calculate SUM of PROFIT
for each unique combination of (Time, Region and Department) using
ROLLUP operation.
2. Given are the fact table PropertySale:
PropertySale(branchNo, propertyType, yearMonth, saleAmount)
and dimension table Branch(branchNo, city)
Populate both the tables with data as per your choice (at least 4 different cities
and 4 different yearMonth) and calculate sum of sale amount for each unique
combination of (propertyType, yearMonth, city) for the year-month (such as
2020-01 and 2020-02) and city (such as Kolkata, Delhi and Patna) by grouping
them into a CUBE using (propertyType, yearMonth, city).
 Python code Experiment on ROLLUP and CUBE operations 1. You are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!