Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT M.MOV_TITLE
- FROM MOVIES M,DIRECTOR D
- WHERE M.DIR_ID=D.DIR_ID
- AND D.DIR_NAME = 'HITCHCOCK';
- SELECT MOV_TITLE
- FROM MOVIES M, MOVIE_CAST MV
- WHERE M.MOV_ID=MV.MOV_ID AND
- MV.ACT_ID IN (SELECT ACT_ID
- FROM MOVIE_CAST
- GROUP BY ACT_ID
- HAVING COUNT (*)>1);
- SELECT A.ACT_NAME
- FROM ACTOR A
- JOIN MOVIE_CAST C
- ON A.ACT_ID=C.ACT_ID
- JOIN MOVIES M
- ON C.MOV_ID=M.MOV_ID
- WHERE M.MOV_YEAR NOT BETWEEN 2000 AND 2015;
- SELECT MOV_TITLE, MAX(REV_STARS)
- FROM MOVIES
- INNER JOIN RATING USING (MOV_ID)
- GROUP BY MOV_TITLE
- HAVING MAX (REV_STARS)>0
- ORDER BY MOV_TITLE;
- UPDATE RATING
- SET REV_STARS=5
- WHERE MOV_ID IN (SELECT M.MOV_ID FROM MOVIES M,DIRECTOR D
- WHERE M.DIR_ID=D.DIR_ID AND
- D.DIR_NAME = 'STEVEN SPIELBERG');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement