Question: (3) Write SQL commands and show the output from Oracle. Your answer must include both SQL commands and the output from Oracle. Note that
(3) Write SQL commands and show the output from Oracle. Your answer must include both SQL commands and the output from Oracle. Note that the output from Oracle should be legible. (50) (3-a) For each customer, find the total number of different products he/she purchased and the total amount he/she paid for the products. (3-b) For each customer.city, find the total number of different products purchased from the city and the total amount of dollars paid by the customers living in the city. (3-c) Find the top 5 products in terms of total sales amount. Also display product IDs and Descriptions with the total sales amount. (3-d) Find the top 5 customers in terms of total sales amount. Display customer IDs names and their total sales amounts. (3-e) Find the top 5 customers in terms of the total number of different products they purchased. Display customer IDs, names and their total number of different products.. Employee Employee_id First_name Middle_initial (0) Last_name sex manager_id hire_date salary commision (0) job_code dob Price_hist Product_id (FK) list_price min_price (0) start_date end_date Customer Customer_id Name Address City Ostate zip_code area_code (0) Phone_number (0) salesperson_id (O) (FK) credit_limit (0) comments (0) HH Product Product_id Description Product_code FH- -H-- Sales_order Order_id Customer_id (FK) Shipdate (0) Order_date Total line_item+ Order_id (FK) Item_seq Product_id (FK) Actual_price Quantity SubTotal
Step by Step Solution
There are 3 Steps involved in it
The questions require writing SQL queries based on the given database schema Ill write the SQL commands for each part of the question The results will ... View full answer
Get step-by-step solutions from verified subject matter experts
