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 DENSE_RANK() OVER(PARTITION BY YEAR(rental_date) ORDER BY COUNT(rental_id)) AS film_rank, f.title AS film_title FROM film f JOIN inventory i USING(film_id) JOIN rental r USING(inventory_id) WHERE YEAR(rental_date) = 2005 GROUP BY film_title ORDER BY film_rank, film_title

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

Copy Clear