Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following tables form part of a database held in a relational DBMS ( Primary Key , Foreign Key ): Item ( Item _ID, Item_Name,

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):

  1. List the number of items purchased by "Retail" Customers
  2. Show the customer(s) who have purchased more than five items (*Show the Customer_No only)
  3. List the maximum number of items purchased by any customer
  4. Show the "Wholesale" Customer(s) who have not purchased any item (*Show the Customer_No only)
  5. List the full details of the most expensive as well as the cheapest item

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Draw a schematic diagram of I.C. engines and name the parts.

Answered: 1 week ago

Question

What is redundancy? What problems are associated with redundancy?

Answered: 1 week ago