English, asked by shubhamajhi1007, 7 months ago

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 lakshmisaroja97
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 ankhidassarma9
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