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 i.inventory_id ELSE 0 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