SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
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 ChatGPT!

Copy Clear