join连接
select f.title, f.description
from film f left join film_category fc
on f.film_id=fc.film_id
join category c
on fc.category_id=c.category_id
where name='Action'
子查询
select title, description
from film f
where f.film_id
in (select fc.film_id from film_category fc
where fc.category_id
in (select c.category_id from category c
where name='Action'))
可以轻易发现子查询就是把join连接那个表变成查询那个表,查询的东西就是join里面on后面接等于那个东西(ps:题目来源牛客网SQL224)