Write a query to display car id, car name, car type of cars which was not taken for rent. Sort the result based on car id.
(HINT: Use Cars and Rentals tables to retrieve records.)
NOTE: Maintain the same sequence of column order, as specified in the question description
Answers
Answered by
11
Answer:
select c.car_id,c.car_name,c.car_type from cars c left join rentals r
on c.car_id=r.car_id where c.car_id not in
(select r.car_id from rentals r);
Explanation:
Answered by
0
Answer:
select car_id,car_name,car_type
from Cars
where car_id not in (select car_id from Rentals)
order by car_id;
Explanation:
Similar questions
Math,
3 months ago
Computer Science,
3 months ago
Math,
7 months ago
Math,
7 months ago
CBSE BOARD X,
11 months ago