SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT CASE f.film_id WHEN '2005-08-01' between r.rental_date and r.return_date THEN r.inventory_id ELSE f.film_id END , f.title FROM film f LEFT JOIN inventory i ON f.film_id = i.film_id LEFT JOIN rental r ON i.inventory_id=r.inventory_id WHERE i.inventory_id IS NULL ORDER BY f.title

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear