L2 Q9
Intermediate Level
Practice Question
Level 2 - Question 9: Exclude Employees in 'HR' Department
Scenario
You need to generate a report of all employees who are not in the 'HR' department.
Task
Use a subquery with NOT IN to return employee_name from employees excluding those in the 'HR' department.
Sample Schema
| employees | departments |
|---|---|
|
emp_id employee_name department_id |
department_id department_name |