Your question is Second Highest Salary Query Duplicate. Start with the requirements and the two tables 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.
Amagi Cloud maintains employee and salary data for internal workforce reporting. Write a PostgreSQL query to retrieve employees whose current salary is the second highest distinct salary in the company.
is_current is TRUE.employee_id, employee_name, and salary, ordered by employee_id.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| team_name | VARCHAR(100) | Amagi team assigned to the employee |
| Column | Type | Description |
|---|---|---|
| salary_idPK | INTEGER | Unique salary record identifier |
| employee_id | INTEGER | References employees.employee_id |
| salary | NUMERIC(12,2) | Annual salary amount |
| is_current | BOOLEAN | Indicates whether the salary record is current |