Yurttas/PL/DBL/postgres/F/01/Movies/q05.sql
Jump to navigation
Jump to search
1/*
2REM
3REM q05.sql
4REM
5REM Which stars appeared in movies produced by
6REM 'Disney' studios in 1997 but not in 1998
7REM 'Disney' movies.
8REM
9*/
10
11SELECT current_schema();
12SET search_path to "movies";
13
14SELECT SI.name
15FROM Movie M, StarsIn SI
16WHERE M.year = 1997
17 AND M.studioname = 'Disney'
18 AND M.title = SI.title
19 AND SI.name NOT IN (SELECT SI.name
20 FROM Movie M, StarsIn SI
21 WHERE M.year = 1998
22 AND M.studioname = 'Disney'
23 AND M.title = SI.title);