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