Im revising for an exam so I need someone to help me with two statements im having trouble with.
Q) Write a SQL statement to produce a list of all the vehicles which were rented out after the 17 September 2010 for a total rental cost of £120.
SELECT car_license_no, car_make......rental_date_out
WHERE rental_date_out > '17-SEP-10'
AND total_sum = 120 ;
Q) Write a SQL statement to produce a list of the registration numbers of the vehicles which were collected before the 12 August 2010 along with the dates when they were returned. To this list, add the registration number of those vehicles which were never rented out.
a) really dont know....
I dont understand, what would the join sysntax do? The columns I need are in one table so I wont need the join syntax?
SELECT car_license_no, rental_date_out, rental_date_returned
[now I need to add vehicles which were never rented out] is this even possible? They cant be listed next to ^that^ statement because those are vehicles which were rented out.