Your question is Third Largest Salary Query. Start with the requirements and the one table 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.
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 |