13 lines
418 B
MySQL
13 lines
418 B
MySQL
|
/*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)));
|