L2 Q4
Intermediate Level
Practice Question
Level 2 - Question 4: List Employees with High Salary and Department Name
Scenario
You want a list of employees who earn more than 8000 and their department names.
Task
Write a SQL query to return employee_name and department_name from employees and departments where salary is greater than 8000.
Sample Schema
| employees | departments |
|---|---|
|
emp_id employee_name department_id salary |
department_id department_name |