Your question is Max Salary Per Department. 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.
HID WorkforceID needs a salary review showing the highest-paid employee or employees in each department. Write a PostgreSQL query that returns all employees tied for the maximum salary within their department.
employees to departments and return the department name, employee name, and salary.NULL.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Primary key for the department |
| department_name | VARCHAR(100) | Department name |
| location | VARCHAR(100) | Primary office location |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Primary key for the employee |
| employee_name | VARCHAR(100) | Employee's full name |
| department_id | INT | References departments.department_id |
| job_title | VARCHAR(100) | Employee's job title |
| salary | NUMERIC(12,2) | Annual salary |