Amazon's Business Analytics team is reviewing compensation levels across active employees. Write a PostgreSQL query that finds the third-highest distinct salary using a self-join on the employees table.
is_active is TRUE.third_highest_salary and one row. Return no rows if fewer than three distinct active salaries exist.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's name |
| job_title | VARCHAR(100) | Employee's role |
| team | VARCHAR(50) | Amazon business team |
| salary | NUMERIC(12,2) | Annual base salary |
| is_active | BOOLEAN | Whether the employee is currently active |