L2 Q1
Intermediate Level
Practice Question
Level 2 - Question 1: Inner Join Employees and Departments
Scenario
You have two tables: employees and departments. You want to get the employee name along with their department name.
Task
Write a SQL query that returns employee_name and department_name by joining the two tables on department_id.
Sample Schema
| employees | columns |
|---|---|
| emp_id | INTEGER |
| employee_name | VARCHAR2(100) |
| department_id | INTEGER |
| departments | columns |
|---|---|
| department_id | INTEGER |
| department_name | VARCHAR2(100) |