Your question is Third Highest 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.
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 |