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 film_rank, title as film_title from ( select film_id, DENSE_RANK() OVER (ORDER BY count(film_id) desc) as film_rank from (select inventory_id from rental where year(rental_date) = 2005) as r join (select film_id, inventory_id from inventory) as i on r.inventory_id = i.inventory_id group by film_id ) as r join film using(film_id) where film_rank < 4 order by film_rank, film_title ; show status like 'Last_query_cost';

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

Copy Clear