Find the 2nd highest salary group by department
Asked in the Round 1 - One-on-one stage.
Write a SQL query using the employees and departments tables.
department_name, second_highest_salary, and employees_in_salary_group.department_name ascending.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | Employee department identifier |
| salary | NUMERIC(12,2) | Annual employee salary |