我需要有关SQL查询的帮助:如何查找已翻译超过4部电影的所有语言的列表,以及特定演员(例如Arnold Schwarzenegger)演奏的所有语言?
答案 0 :(得分:0)
你可以试试这个。
SELECT l.language_id, l.name, COUNT(*)
FROM
film_translation ft
INNER JOIn [language] l ON ft.language_id = l.language_id
INNER JOIN [film] f on ft.film_id = f.film_id
INNER JOIN [film_actor] fa on f.film_id = fa.film_id
INNER JOIN [actor] a on fa.actor_id = a.actor_id
WHERE
a.first_name ='Arnold'
and a.last_name ='Schwarzenegger'
GROUP BY
l.language_id, l.name
HAVING
COUNT(f.film_id) > 4