Do the following exercises on the Oracle HR database, see lab 1 for information on the HR database and on how to
access it in OracleXE.
Write SQL queries that:
- Get a list of the employees who have finished all of their jobs. N.b., this is
trickier that you might think; check the multiplicities and constraints set in
the DB schema.
- Get a list of employees along with their manager such that the managers have less
seniority at the company and that all the employees’ jobs have been within the
manager’s department.
- The countries in which at least one department is located. Try to write this as both
a join and a nested query. If you can, explain which is better. If you can’t,
explain which is not possible and why.
Store your results in homework05_1.sql
.
Complete the programming elements for the lab exercises.
Make your queries as simple and efficient as possible.
Checking in
We will grade your work according to the following criteria:
- 75% — Exercise 1
- 25% — Exercise 2