I am trying to practice my SQL skills, I have this schema:
And i came up with this query:
SELECT vehicle_id
FROM reservation
WHERE NOT (pickup_date<='2017-05-20'
AND end_date>='2017-05-15')
it will return rows of vehicle_ids, I want to be able to use those vehicle ids and return vehicle_name from vehicle table. How to go about this? I have heard of SQL joins will a JOIN achieve this goal?