Lab 6: Subqueries
For these exercises, we use the Employees Database created in Laboratory 1. Answer
each question with a single SQL statement. Your query must work for any set of data in
the Employees Database, not just the set of data we provide.
1. Find the names of all people who work in the Consulting department.
2. Find the names of all people who work in the Consulting department and who
spend more than 20% of their time on the project with ID ADT4MFIA.
3. Find the names of all departments not currently assigned a project.
4. Find the first and last names of all employees who make more than the average
salary of the people in the Accounting department.
5. Find the minimum salary of the employees who are paid more than everyone in
the Accounting department.
6. Find all departments where all of their employees are assigned to all of their
projects.