Module 8 Assignment
Module 8 Assignment
views in DB2. You will create several materialized views and apply the matching process to
You will use the Inventory Data Warehouse in the module 8 assignment. Other
documents provide details about the Inventory Data Warehouse. The Inventory Data Warehouse
design and rows are identical from module 5. If you added rows through the data integration
assignment in module 5, you should remove those rows or just recreate and repopulate the tables.
specifications:
The result should contain the sum of the extended cost, the sum of the quantity,
These calculated amounts should be summarized by the customer vendor key and
The result should include only sales shipment transactions (transaction type 5) for
The materialized view should not contain subtotals that are created by the CUBE
To make the peer assessment easier, you should name your materialized view
“SalesByVendorDateKeyMV2011”.
specifications:
10/10/2019 Module 4 Assignment Page 2
The result should contain the sum of the extended cost, the sum of the quantity,
These calculated amounts should be summarized by the customer vendor key and
The result should include only sales shipment transactions (transaction type 5) for
The materialized view should not contain subtotals that are created by the CUBE
To make the peer assessment easier, you should name your materialized view
“SalesByVendorDateKeyMV2012”.
query 1 from the module 8 assignment. After you submit the module 8 assignment, you will have
access to the solution as part of the peer assessment. You should rewrite query 1 using the
materialized views to replace the fact table and possibly dimension tables. You should not use a
CREATE VIEW statement in your solution. For ease of reference, here are the requirements for
Write an SQL statement to display the sum of the extended cost and the sum of the
quantity. The results should include data for shipments (transaction type 5) in calendar year 2011.
Summarize the result by calendar month and Address Category Code 1. The result should include
query 2 from the module 2 assignment. After you submit the module 2 assignment, you will have
access to the solution as part of the peer assessment. You should rewrite query 2 using the
materialized views to replace the fact table and possibly dimension tables. You can use either the
CUBE or GROUPING SETS operator in your solution. You should not use a CREATE VIEW
statement in your solution. For ease of reference, here are the requirements for query 2 of the
module 2 assignment.
Write an SQL statement to display the sum of the extended cost and the number of
inventory transactions. The results should include data for shipments (transaction type 5) in
calendar years 2011 and 2012. Summarize the result by calendar quarter, customer zip code, and
customer name. The result should include the grouped columns and the full set of subtotals for
Grading
Your performance will be assessed by a quiz designed to test your understanding of each
problem and by evidence of query executions. Since some quiz questions involve execution
results, you should execute your statements using the original inventory data warehouse tables.
You will receive 50% if your documentation contains SQL statements and partial results
for each problem. Execution of your SQL statements demonstrates correct syntax.
The quiz score will provide the other 50% of your grade. The quiz contains questions
about the important elements of each problem such as the usage of the correct tables,
function, partitioning, and sorting.
Completion
You should upload a file containing your DB2 statements and execution results to the
graded item in module 8. For the execution results, you should take a snapshot of the script
10/10/2019 Module 4 Assignment Page 4
output window in Data Studio showing the execution results. For problems 3 and 4, you only
need to show the first 10 rows or so of the result. You should paste the execution results after the