Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Develop a SELECT statement for each of the following requirements: Querying the Fact only 1 . Display the Number of Orders in the D _

Develop a SELECT statement for each of the following requirements:
Querying the Fact only
1. Display the Number of Orders in the D_ORDERS table.
2. Display the Number of Orders in the F_ORDERS table (Check that you get the same number from
the dimension table D_ORDERS).
3. Display the Lowest, Highest and Average Amount of all Orders.
4. For each customer, display the Lowest, Highest and Average Amount of orders.
Query the Fact and one dimension
5. Display the customers(id and Name) having an average Amount of orders greater than the double
of the average amount of all orders.
---> You should get 4 rows.
6. Number of Orders by Salesman (ID_S and SName are required)
---> You should get 4 rows.
7. Number of Orders by customer (Id, FName, LName)
8. Modify your previous answer to display the Number of Orders and their Total by Customer (Id,
FName, LName) sorted by the number of order descending.
9. Display each Customer (Id, C_FName, C_LName) having the total amount of its Orders greater
than 80% of the average of all Orders.
Queries using two dimensions and the fact
10. Display the Number of direct Orders (OMode =DIRECT) by Customer (Id, C_FName, C_LName)
and Salesman (identifier and name).
---> You should get 69 rows.
11. Total Amount of Orders by Year and Customer ID, sorted by Year and Customer.
---> You should get 68 rows
Simulate the Drill-Down operator
12. Transform query 11 to display the result of the following OLAP operation:
DrillDown(Q11, D_Time, Quarter)-- Where Q11 is the result of question 11.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started