Question
Given this database schema : Dish(DId, name, type) type means: appetizer, dessert, main dish, etc. Restaurant(RId, RName, type, ChefName, phoneNumber, address) Offers(Rid, DId, price) Order(Did,
Given this database schema :
Dish(DId, name, type) type means: appetizer, dessert, main dish, etc.
Restaurant(RId, RName, type, ChefName, phoneNumber, address)
Offers(Rid, DId, price)
Order(Did, Cid, date)
Customer(Cid, CName, Caddress)
Write down the following queries in SQL:
-
Retrieve the restaurant names and addresses that serve pizza and Macaroni.
-
Retrieve the name of the customers who ordered pizza.
-
Retrieve the name of the customer who ordered Pizza and Lasagna before 20/2/2016.
-
Retrieve the number of Pizza ordered by Majed Zahrani from the restaurant Piato.
-
Retrieve all restaurant names that serve pizza but not Macaroni.
-
Give the number of dishes that offers each restaurant
-
Retrieve the customers who ordered Pizza more than five times
-
Retrieve how many dishes do the restaurants Piato and Mama Noura have.
-
Retrieve the price of the most expensive dish of the restaurant AlSaraya
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