sql 第28题

select
c.name
,count(f.film_id)
from film f
join film_category fc
on f.film_id = fc.film_id
join category c
on c.category_id = fc.category_id
where f.description like '%robot%'
and c.name in (
select
name
from category
join film_category
on category.category_id =film_category.category_id
group by name
having count(film_category.film_id) >= 5
)
group by c.name