Yurttas/PL/DBL/postgres/F/01/SPJ/q010.sql

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2REM
 3REM q010.sql
 4REM
 5REM Get project names for projects supplied by suppliers
 6REM 'S01' or 'S03'.
 7REM
 8*/
 9
10SELECT current_schema();
11SET search_path to "spj";
12
13SELECT DISTINCT jname
14FROM Projects
15WHERE jn IN (SELECT jn
16             FROM Shipments
17             WHERE sn='S01'
18                OR sn='S03');