Your question is SQL Maximum Salary Query. 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.
Xebia's People Analytics team needs to identify the employees receiving the highest salary. Write a PostgreSQL query that returns every employee whose salary equals the maximum salary recorded in the employee table, along with the department information available in the department table.
NULL department name in that case.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| department_id | INTEGER | Identifier of the employee's department |
| salary | NUMERIC(12,2) | Annual employee salary |
| Column | Type | Description |
|---|---|---|
| department_idPK | INTEGER | Unique department identifier |
| department_name | VARCHAR(100) | Department display name |