Find Employees in the HR Department
SQL coding challenge · Difficulty: easy · +50 XP
Problem
HR needs a roster of all employees assigned to the HR department along with their department name.
Tables
Table: Employee
| employee_id | name | department_id | | --- | --- | --- | | 1 | Krishna | 1 | | 2 | Parvati | 2 | | 3 | Ashna | 3 | | 4 | Pinki | 1 | | 5 | Shruti | 4 |
Table: Department
| department_id | department_name | | --- | --- | | 1 | HR | | 2 | Finance | | 3 | IT | | 4 | Sales |
Expected Output
| employee_id | name | department_name | | --- | --- | --- | | 1 | Krishna | HR | | 4 | Pinki | HR |
- Return:
employee_id,name,department_name - Only employees in the HR department
- Sort by
nameascending