Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The primary key for CUSTOMER is CUSTOMERID, the primary key for DELIVERER is DELIVERERID, the primary key for FOOD is ITEMID, the primary key for

The primary key for CUSTOMER is CUSTOMERID, the primary key for DELIVERER is DELIVERERID, the primary key for FOOD is ITEMID, the primary key for ORDER is ORDERID,and the primary key for INCLUDES is ORDERID and ITEMID together.CUSTOMER(CUSTOMERID, CUSTOMER_NAME, CUSTOMER_PHONE, CUSTOMER_CITY, CUSTOMER_REFERENCEID)DELIVERER(DELIVERERID,DELIVERER_NAME, DELIVERER_PHONE)FOOD(ITEMID,ITEM_NAME,ITEM_CATEGORY,PRICE )ORDERS(ORDERID,CUSTOMERID,DELIVERERID,DELIVERY_TIME,DELIVERY_DATE)INCLUDES(ORDERID,ITEMID,QUANTITY)

A.Write a query to output the names of customers who have ordered the food item Humus.

B.Write a query to output the name of all customers and the name of their reference.

C.Write a query to output the ItemID of all food items that have never been included in an order.

D.Write a query to output the name of each deliverer and the number of orders they have delivered.

E.Write a query to output the average price of a food item.

F.Write a query to output the item name of the most expensive food.

G.Write a query to output the name and phone of all customers and delivery people. There should be just two columns in this output.

H.Write a query to output the customer name, the customer city, the delivery date, and the delivery time for all customers andtheir orders. If the customer has made no orders, we should still see that customers other information in the output.

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

=+herself to in terms of equity with regard to this assignment?

Answered: 1 week ago

Question

=+ What typical employee will the IA compare him/

Answered: 1 week ago

Question

=+7 What is the overall cost of the international assignment?

Answered: 1 week ago