SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT a.actor_id, a.first_name, a.last_name, COUNT(fa.film_id) AS film_count FROM actor a JOIN film_actor fa ON a.actor_id = fa.actor_id GROUP BY a.actor_id HAVING COUNT(fa.film_id) > ( SELECT COUNT(fa2.film_id) FROM film_actor fa2 JOIN actor a2 ON fa2.actor_id = a2.actor_id WHERE a2.first_name = 'HENRY' AND a2.last_name = 'BERRY' ) ORDER BY film_count ASC; ; show status like 'Last_query_cost';

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear