The following tables form part of a database held in a relational DBMS ( Primary Key ,
Fantastic news! We've Found the answer you've been seeking!
Question:
The following tables form part of a database held in a relational DBMS (Primary Key,Foreign Key):
Item (Item _ID, Item_Name, Item_Price)
Customer (Customer_No, L_Name, F_Name, Address, Type)
CustomerItem (Customer_No, Item_No, Date_Purchased)
Employee (Employee_No L_Name, F_Name, Role)
Provide the SQL for the following queries (5 marks each):
- List the number of items purchased by "Retail" Customers
- Show the customer(s) who have purchased more than five items (*Show the Customer_No only)
- List the maximum number of items purchased by any customer
- Show the "Wholesale" Customer(s) who have not purchased any item (*Show the Customer_No only)
- List the full details of the most expensive as well as the cheapest item
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: