You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
418 B
SQL

/*41. Write a query in SQL to find the name of those movies where one or more actors acted in two or more movies. */
SELECT mov_title
FROM movie
WHERE mov_id IN (
SELECT mov_id
FROM movie_cast
WHERE act_id IN (
SELECT act_id
FROM actor
WHERE act_id IN (
SELECT act_id
FROM movie_cast GROUP BY act_id
HAVING COUNT(act_id)>1)));