Yurttas/PL/DBL/mysql/F/01/00/Company-B/q05.sql

From ZCubes Wiki
Revision as of 16:18, 3 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q05.sql REM REM Find all employees who live in the same City and REM on the same Street as their Manager. R...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM q05.sql
 4REM
 5REM Find all employees who live in the same City and
 6REM on the same Street as their Manager.
 7REM
 8*/
 9
10\. set-db.sql
11
12SELECT E1.employeename
13FROM Employee E1, Manages M, Employee E2
14WHERE E1.employeename = M.employeename
15  AND M.managername = E2.employeename
16  AND E1.Street = E2.Street
17  AND E1.City = E2.City;