Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions