Question: Two part question, A. creating a cube B. solving queries from the cube created in part A. Based on the tables in the database given
Two part question, A. creating a cube B. solving queries from the cube created in part A.
Based on the tables in the database given by the description below:
Tb_Supplier(Supp_ID, Name, City, State)
Tb_Consumer(Con_ID, Name, City, State)
Tb_Product(Prod_ID, Name, Product_Category, Product_Line, Product_Packaging)
Tb_Offers(Supp_ID, Prod_ID, Quantity, Price)
Tb_Requests(Con_ID, Prod_ID, Quantity, Price)
Tb_Transactions(Tran_ID, Supp_ID, Con_ID, Prod_ID, Quantity, Price)
A.use SQL with GROUP BY, CUBE and ROLLUP toconstruct a cubewith the following characteristics:
The dimensions of the cube are:Tb_SupplierandTb_Product.
Measure groups table is:Tb_Offers.
Measure aggregates:SUM(Quantity), SUM(Quantity*Price),
MAX(Price) , MIN(Price).
Dimension hierarchies:
Tb_Supplier:State > City > Name
Tb_Product:Product_Packaging> Name
Product_Category > Product_Line > Name
B.Given the cube created at pointA) solve the following queries using SQL:
1. Value of products offered by supplier and by product packaging?
2. Volume of milk offered by each supplier in Wisconsin?
3. Find the maximum price for each product offered in Madison?
4. For each supplier city find the product offered in largest quantity?
5. For each product find the city where it is offered at the lowest price?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
