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 first_name, last_name, film_count from (select a.first_name, a.last_name, count(distinct fc.category_id) cat, count(distinct f.film_id) film_count from actor a join film_actor fa on a.actor_id=fa.actor_id join film f on fa.film_id=f.film_id join film_category fc on f.film_id=fc.film_id group by 1,2) x where cat=(select count(category_id) from category) order by film_count desc, last_name ; show status like 'Last_query_cost';

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

Copy Clear