Tredence's people analytics team needs to identify employees earning the third-highest salary among current employees. Write a PostgreSQL query that preserves employees whose department reference is missing.
employment_status is Active and whose salary is not NULL.LEFT JOIN so an employee with an unmatched department remains in the result.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| department_id | INT | Referenced department identifier |
| salary | NUMERIC(12,2) | Annual employee salary |
| employment_status | VARCHAR(20) | Employment status such as Active or Inactive |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department display name |