Your question is SQL for Second Largest Value. 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 uses employee compensation data to support workforce analysis. Write a PostgreSQL query to identify employees earning the second highest distinct salary among currently active employees.
employment_status = 'Active'.employee_id, employee_name, and salary.NULL salary from consideration and order the results by employee_id.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| salary | NUMERIC(12,2) | Annual employee salary |
| employment_status | VARCHAR(20) | Current employment status |