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
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.
Given are the fact table PropertySale:
PropertySalebranchNo propertyType, yearMonth, saleAmount
and dimension table BranchbranchNo city
Populate both the tables with data as per your choice at least different cities
and different yearMonth and calculate sum of sale amount for each unique
combination of propertyType yearMonth, city for the yearmonth such as
and and city such as Kolkata, Delhi and Patna by grouping
them into a CUBE using propertyType yearMonth, city
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
