Teradata Vantage HR analysts need to identify employees whose compensation is at the third-highest distinct salary level. Write a PostgreSQL query against the employees table.
employee_id, employee_name, department, and salary, ordered by employee_id.Use DENSE_RANK() rather than ROW_NUMBER() because multiple employees can share the same salary, and tied salary values should receive the same rank.
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| department | VARCHAR(80) | Organizational department |
| salary | NUMERIC(12,2) | Annual salary |