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

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2REM
 3REM q02.sql
 4REM
 5REM Get supplier numbers for suppliers with a status lower
 6REM than that of supplier 'S01'.
 7REM
 8*/
 9
10SELECT current_schema();
11SET search_path to "spj";
12
13SELECT sn
14FROM Suppliers
15WHERE status < (SELECT status
16                FROM Suppliers
17                WHERE sn='S01');