Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the Drivers-Cars-Reserves DB for a small rental car company: Drivers(id, name, rating, age) Cars(vin, maker, model, year, color) Reserves(did, vin, date) Give SQL statement

Consider the Drivers-Cars-Reserves DB for a small rental car company:

Drivers(id, name, rating, age)

Cars(vin, maker, model, year, color)

Reserves(did, vin, date)

  1. Give SQL statement each of the following operations:
  1. Find the colors of cars reserved by Smith.
  2. Find all ids of drivers who have a rating of at least 7 or reserved car with VIN:1HGCM82633A004352
  3. Find the names of drivers who have not reserved a red car.
  4. Find the names of drivers who have reserved at least two cars.
  5. Find the driver ids of all drivers whose rating is better than some driver called Bob.
  6. Find the driver ids of all drivers whose rating is better than every driver called Bob.
  7. Find the driver ids of all drivers with the highest rating.
  8. Find the names of drivers who have reserved all cars.

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

what are the provisions in the absence of Partnership Deed?

Answered: 1 week ago

Question

1. What is called precipitation?

Answered: 1 week ago

Question

1.what is dew ?

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago