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:

  1. Retrieve the restaurant names and addresses that serve pizza and Macaroni.

  2. Retrieve the name of the customers who ordered pizza.

  3. Retrieve the name of the customer who ordered Pizza and Lasagna before 20/2/2016.

  4. Retrieve the number of Pizza ordered by Majed Zahrani from the restaurant Piato.

  5. Retrieve all restaurant names that serve pizza but not Macaroni.

  6. Give the number of dishes that offers each restaurant

  7. Retrieve the customers who ordered Pizza more than five times

  8. Retrieve how many dishes do the restaurants Piato and Mama Noura have.

  9. Retrieve the price of the most expensive dish of the restaurant AlSaraya

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!