SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
with t as ( select c.first_name, c.last_name, group_concat(f.title) as films, dense_rank() over(order by count(title) desc) as r from customer c join rental r on c.customer_id = r.customer_id join inventory i on r.inventory_id = i.inventory_id join film_actor fa on i.film_id = fa.film_id join actor a on fa.actor_id = a.actor_id join film f on i.film_id = f.film_id where a.first_name = 'EMILY' and a.last_name = 'DEE' group by first_name, last_name ) select first_name, last_name, films from t where r = 1 order by last_name

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear