Yurttas/PL/DBL/mysql-f-2010/01/Company-A/q01.sql

Revision as of 01:59, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q01.sql REM REM Retrieve the names of employees in department 5 REM who work more than 10 hours per week on...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 1/*
 2REM
 3REM q01.sql
 4REM
 5REM Retrieve the names of employees in department 5
 6REM who work more than 10 hours per week on the
 7REM 'ProductX' project.
 8REM
 9*/
10
11\. set-db.sql
12
13SELECT DISTINCT fname, minit, lname
14FROM Employee, Project, WorksOn
15WHERE Employee.dno = Project.dnum
16  AND Employee.ssn = WorksOn.essn
17  AND Project.pnumber = WorksOn.pno
18  AND Employee.dno = 5
19  AND hours > 10
20  AND pname = 'ProductX';