Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SELECT DISTINCT CNAME FROM CUSTOMER WHERE CID IN (SELECT CID FROM RENTALS WHERE RETURN IN (SELECT BIRTHPLACE FROM CUSTOMER)) What is the meaning of this
SELECT DISTINCT CNAME FROM CUSTOMER WHERE CID IN (SELECT CID FROM RENTALS WHERE RETURN IN (SELECT BIRTHPLACE FROM CUSTOMER))
What is the meaning of this query?
a.List customers whose rental was returned to a city that is also a birthplace
b.List customers whose rental was returned to their birthplace
c.None of the above
d.List customers whose rental was returned to someone else's birthplace
Car Rental Database CUSTOMER CID AGE CNAME BLACK GREEN JONES MARTIN SIMON VERNON RESID CITY ERIE CARY HEMET HEMET ERIE CARY BIRTHPLACE TAMPA IERIE TAMPA TAMPA ERIE CARY In table CUSTOMER, CD is the primary key (Customer ID). RTN 10 12 RENTALS CID MAKE in FORD GM FORD NISSAN FORD GM FORD GM TOYOTA 4 DATE OUT PICKUP 10-Oct-1994 CARY 01-Nov-1995 TAMPA 01-Jan-1995 ERIE 07-Jul-1994 TAMPA 01-Jul-1995 CARY 01-Aug-1995 ERIE 01-Aug-1994 CARY 01-Sep-19/95 ERIE 02-Sep-1995 RENO RETURN CARY CARY ERIE TAMPA ERIE ERIE ERIE CARY I RENO 19 In the table RENTALS, RTN provides the rental number (the primary key), CID is the customer's unique id, PICKUP is the city where the car was picked up, and Return is the city where the car was returned. COST 30 RENTCOST MAKE FORD GM NISSAN TOYOTA VOLVO 40 30 20 1 SO RENTCOST shows the base cost of renting a given MAKE for one day. FACTOR CITYADJ CITY CARY ERIE RENO TAMPA 11 09 0.8 If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below. RENTLENGTH RIN DAYSStep 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