Yurttas/PL/DBL/mssql/F/01/Company-A/q01.sql

Revision as of 04:28, 3 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
11SELECT DISTINCT fname, minit, lname
12FROM Employee, Project, WorksOn
13WHERE Employee.dno = Project.dnum
14  AND Employee.ssn = WorksOn.essn
15  AND Project.pnumber = WorksOn.pno
16  AND Employee.dno = 5
17  AND hours > 10
18  AND pname = 'ProductX';