Answered step by step
Verified Expert Solution
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)
- Give SQL statement each of the following operations:
- Find the colors of cars reserved by Smith.
- Find all ids of drivers who have a rating of at least 7 or reserved car with VIN:1HGCM82633A004352
- Find the names of drivers who have not reserved a red car.
- Find the names of drivers who have reserved at least two cars.
- Find the driver ids of all drivers whose rating is better than some driver called Bob.
- Find the driver ids of all drivers whose rating is better than every driver called Bob.
- Find the driver ids of all drivers with the highest rating.
- Find the names of drivers who have reserved all cars.
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