Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following database schema for a rental car business. Use SQL to express each of the following queries using a minimum number of operations

Given the following database schema for a rental car business. Use SQL to express each of the following queries using a minimum number of operations and tables:
Cars( PlateNumber, Make, Rate, Status)// Status = available or null (rented out); Rate = the daily charge in dollars.
Customer ( FullName, PhoneNumber, DLNumber, CreditCardNumber)
RentalTranscation ( TranscationNumber, FullName, PlateNumber, PickUpDate, ReturnDate)// ReturnDate may assume the value null if it hasnt been returned and you may treat the dates as integers
Select the correct SQL query for the following question.
Question: List the fullName of every customer who only rented cars which have rates <10 dollar.
Group of answer choices
SELECT R.FullNAME
FROM RentalTransaction R
WHERE FullName NOT IN( SELECT RR.FullName
FROM RentalTransaction RR , CARS C
WHERE RR.PLateNumber = C.PlateNumber AND C.Rate >=10);
SELECT R.FullNAME
FROM RentalTransaction R
WHERE FullName NOT IN { SELECT RR.FullName
FROM RentalTransaction RR , CARS C
WHERE RR.PLateNumber = C.PlateNumber AND C.Rate <10};
SELECT R.FullNAME
FROM RentalTransaction R
WHERE FullName IN( SELECT RR.FullName
FROM RentalTransaction RR , CARS C
WHERE RR.PLateNumber = C.PlateNumber AND C.Rate <0);
None of the provided answers

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

Students also viewed these Databases questions

Question

Have I incorporated my research into my outline effectively?

Answered: 1 week ago