sql script

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