Yurttas/PL/DBL/postgres/F/01/Company-A/q03.sql

Revision as of 00:41, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">β†’β€ŽREM REM q03.sql REM REM Find the names of employees who are directly supervised REM by 'Franklin Wong'. REM: SEL...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)
 1/*
 2REM
 3REM q03.sql
 4REM
 5REM Find the names of employees who are directly supervised
 6REM by 'Franklin Wong'.
 7REM
 8*/
 9
10SELECT current_schema();
11SET search_path to "companya";
12
13SELECT DISTINCT E1.fname, E1.minit, E1.lname 
14FROM Employee E1, Employee E2
15WHERE E1.superssn = E2.ssn
16  AND E2.fname = 'Franklin'
17  AND E2.lname = 'Wong';