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 c.name, f.title, count(1) as rentals_count, dense_rank() over(order by count(1) desc) as r from category c join film_category fc on c.category_id = fc.category_id join film f on fc.film_id = f.film_id join inventory i on f.film_id = i.film_id join rental r on i.inventory_id = r.inventory_id where r.rental_date like '2005%' group by c.name, f.title

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

Copy Clear