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 f.title, c.name , count(*), rank() over(order by f.title, c.name , count(*)) FROM film as f JOIN inventory as i ON f.film_id = i.film_id join rental as r on i.inventory_id = r.inventory_id join film_category as fc on f.film_id = fc.film_id join category as c on fc.category_id = c.category_id WHERE DATE_FORMAT(rental_date, '%Y') = '2005' GROUP BY f.title, c.name

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

Copy Clear