Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
SELECT f.title AS most_rented_movie FROM film f JOIN inventory i USING (film_id) JOIN rental r USING (inventory_id) WHERE r.rental_date >= '2006-02-01' AND r.rental_date < '2006-03-01' GROUP BY f.film_id ORDER BY COUNT(*) DESC LIMIT 1; /* SELECT title AS most_rented_movie FROM film WHERE film_id = ( SELECT inventory.film_id FROM rental JOIN inventory USING (inventory_id) WHERE rental_date BETWEEN '2006-02-01' AND '2006-02-28' GROUP BY film_id ORDER BY COUNT(*) DESC LIMIT 1 ); */ ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask AI support!

Copy Clear