TCS iON is reviewing compensation among its active employees. Write a PostgreSQL query to find every active employee whose salary is the second-highest distinct salary in the employee table.
Active before calculating the salary ranking.salary is NULL; they must not take part in the ranking.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| salary | NUMERIC(12,2) | Annual salary |
| department_id | INTEGER | Reference to the employee's department |
| employment_status | VARCHAR(20) | Current employment status |
| Column | Type | Description |
|---|---|---|
| department_idPK | INTEGER | Unique department identifier |
| department_name | VARCHAR(100) | Department name |