SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select b.name as category, concat_ws(',', b.title) as most_rented_films, count(rental_id) as rentals_count from (select category.name, film.title, count(rental_id) from rental left join inventory using (inventory_id) left join film using (film_id) left join film_category using (film_id) left join category using (category_id) where rental_date like '%2005%' group by category.name, film.title) as b group by category

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear