Your question is Second-Highest Salary SQL. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Airtel engineering leadership wants a salary benchmark alongside department-level workforce statistics. Write a PostgreSQL query that identifies the second-highest distinct salary and returns it with aggregated statistics for every Airtel department.
LEFT JOIN.department_id ascending.| Column | Type | Description |
|---|---|---|
| department_idPK | INTEGER | Unique department identifier |
| department_name | VARCHAR(100) | Airtel department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| salary | NUMERIC(12,2) | Annual employee salary |
| department_id | INTEGER | Referenced department identifier |
| employment_status | VARCHAR(20) | Current employment status |