Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started