Consider the following database instance, which contains information about employees and the projects to which they are assigned:
Employee
empId |
lastName |
E101 |
Smith |
E105 |
Jones |
E110 |
Adams |
E115 |
Smith |
Project
projectNo |
projectName |
budget |
P10 |
Hudson |
50000 |
P15 |
Columbia |
60000 |
P20 |
Wabash |
40000 |
P23 |
Arkansas |
80000 |
Assign
employeeId |
projectNo |
hours |
E101 |
P10 |
40 |
E101 |
P15 |
30 |
E104 |
P10 |
20 |
E110 |
P15 |
30 |
E110 |
P20 |
30 |
E115 |
P10 |
20 |
E115 |
P20 |
30 |
A. SELECT Employee WHERE lastName = ‘Adams’
B. SELECT Project WHERE budget < 70000 GIVING CheapProj
PROJECT ChapProj OVER projectName
C. SELECT Assign WHERE hours > 25 GIVING MuchWork
PROJECT MuchWork OVER employeeId
Solution
A. SELECT Employee WHERE lastName = ‘Adams’
empId |
lastName |
E110 |
Adams |
B. SELECT Project WHERE budget < 70000 GIVING CheapProj
PROJECT ChapProj OVER projectName
projectNo |
projectName |
budget |
P10 |
Hudson |
50000 |
P15 |
Columbia |
60000 |
P20 |
Wabash |
40000 |
C. SELECT Assign WHERE hours > 25 GIVING MuchWork
PROJECT MuchWork OVER employeeId
employeeId |
projectNo |
hours |
E101 |
P10 |
40 |
E101 |
P15 |
30 |
E110 |
P15 |
30 |
E110 |
P20 |
30 |
E115 |
P20 |
30 |
--
All the best
Get Answers For Free
Most questions answered within 1 hours.