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

From ZCubes Wiki
Jump to navigation Jump to search
 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';