OsborneKlein supports compensation analysis for Ameriprise teams. Write a PostgreSQL query that ranks employees by salary within their department and returns employees in the top three salary ranks.
employees to departments to display the department name.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | References departments.department_id |
| salary | NUMERIC(12,2) | Annual employee salary |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department display name |