Question: SQL ***** the tables exists in sql live already OE.CUSTOMERS OE.ORDERS OE.ORDER_ITEMS Answer the following questions. For analysis purposes, Decision-Makers want to classify the Customers
SQL *****


the tables exists in sql live already
OE.CUSTOMERS
OE.ORDERS
OE.ORDER_ITEMS
Answer the following questions. For analysis purposes, Decision-Makers want to classify the Customers according to the Turnover of each one according to the following: The Turnover of a customer is the total amount of all his Orders. This data is not in the DB tables; therefore, you need to calculate it in order to determine the Customer Type. The Type of a customer depends on his Turnover. We expect three types of customers noted 'A', 'B' and 'C'. The Type is: A if the Turnover > Avg_Turnover (where Avg_Turnover is the Average Turnover of all customers). 'B' if 0.5 * Avg_Turnover Turnover Avg_Turnover (where Avg_Turnover is the Average Turnover of all customers). 'B' if 0.5 * Avg_Turnover Turnover
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
