Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e…..

Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e..... 1

This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List each make of car, and the total number of cars of that make. (c) List the registration number of all the cars that have never been rented. (d) Change the phone number of customer Jones to 999-1234.

Expert Answer

 

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

a-select CAR.RegistrationNo, Make from
CAR,RENTAL,CUSTOMER
where CUSTOMER.CustName=’Smith’
AND
CUSTOMER.CustNo=RENTAL.CustNo
AND
RENTAL.RegistrationNo=CAR.RegistrationNo;

b-select count(make) as cars , Make from
CAR
group by Make;

Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e..... 2

C-

select CAR.RegistrationNo from
CAR
where CAR.RegistrationNo NOT IN (select RegistrationNo from RENTAL);

Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e..... 3D-UPDATE CUSTOMER
set Phone=9991234
where CustName=’Jones’;

Question & Answer: This question is based on the tables listed below: Give SQL statements for each of the following: (a) List all the cars rented by customer Smith since 1 November 2015. (b) List e..... 4

Still stressed from student homework?
Get quality assistance from academic writers!