题意条件:

  1. like匹配robot
  2. 每个电影分类下的总数目>=5(注意:并不是包含robot条件下的)
    SELECT 
    c.name AS `分类名称category.name`,
    COUNT(f.film_id) AS `电影数目count(film.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%' 
    AND c.category_id IN 
    (SELECT 
     category_id 
    FROM
     film_category 
    GROUP BY category_id 
    HAVING COUNT(film_id) >= 5)