select title, description
from film
where film_id in
(select film_id
from film_category
where category_id in
(select category_id
from category
where name = 'Action'));
解题思路 从内到外,依次嵌套。
-- 第一步:找出Action对应的category_id
select category_id
from category
where name = 'Action';
-- 第二步:找出category_id对应的film_id
select film_id
from film_category
where category_id in
(select category_id
from category
where name = 'Action');
-- 第三步: 找出film_id对应的title,description
select title, description
from film
where film_id in
(select film_id
from film_category
where category_id in
(select category_id
from category
where name = 'Action'));