Yurttas/PL/DBL/postgres/F/01/Movies/q04.sql

Revision as of 00:46, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q04.sql REM REM Find the names and addresses of movie stars REM of movies produced by 'Steven Spielberg'. R...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 1/*
 2REM
 3REM q04.sql
 4REM
 5REM Find the names and addresses of movie stars
 6REM of movies produced by 'Steven Spielberg'.
 7REM
 8*/
 9
10SELECT current_schema();
11SET search_path to "movies";
12
13SELECT MS.name, MS.address
14FROM MovieStar MS, MovieExec ME, Movie M, StarsIn SI
15WHERE ME.name = 'Steven Spielberg'
16  AND ME.cn = M.producercn
17  AND M.title = SI.title
18  AND SI.name = MS.name;