Yurttas/PL/DBL/postgres/F/01/Company-B/q04.sql
1/*
2REM
3REM q04.sql
4REM
5REM Find all employees who live in the same city as
6REM the company they work for.
7REM
8*/
9
10SELECT current_schema();
11SET search_path to "companyb";
12
13SELECT E.employeename
14FROM Employee E, Works W, Company C
15WHERE E.employeename = W.employeename
16 AND W.companyname = C.companyname
17 AND E.city = C.city;