Computer Science Assignments 6 & 8
Assignment #8
1. Using the Employees table of Figure 14.6, what is the result of the following SQL query?
SELECT *
FROM Employees
WHERE HoursWorked < 100;
2. Write an SQL query that retrieves first and last names and pay rate, ordered by PayRate, from the Employees table of Figure 14.6.
3. Using the Employees table of Figure 14.6 and the Insur-ancePolicies table of Figure 14.7, what is the result of the following SQL query? (The # marks allow the date to be treated numerically.)
SELECT ID, PlanType
FROM Employees, InsurancePolicies
WHERE Birthdate > #1/01/1960# AND ID = EmployeelD;
Table 14.6
ID LastName FirstName BirthDate PayRate HoursWorked
|
116 |
Kay |
Janet |
3/29/1956 |
$16.60 |
94 |
|
123 |
Perreira |
Francine |
8/15/1987 |
38.50 |
185 |
|
149 |
Takasano |
Frederick |
5/23/1966 |
$12.35 |
250 |
|
171 |
Kay |
John |
11/17/1954 |
$17.80 |
245 |
|
165 |
Honou |
Morris |
6/9/1988 |
$6.70 |
53 |
Table 14.7
EmployeeID PlanType DateIssued
|
171 |
B2 |
10/18/1974 |
|
171 |
C1 |
6/21/1982 |
|
149 |
B2 |
8/16/1990 |
|
149 |
A1 |
5/23/1995 |
|
149 |
C2 |
12/18/1999 |