Fetching algorithms...
Fetching algorithms...
Employee table:
| id | name | salary | departmentId |
|---|---|---|---|
| 1 | Joe | 70000 | 1 |
| 2 | Jim | 90000 | 1 |
| 3 | Henry | 80000 | 2 |
| 4 | Sam | 60000 | 2 |
| 5 | Max | 90000 | 1 |
Department table:
| id | name |
|---|---|
| 1 | IT |
| 2 | Sales |
| Department | Employee | Salary |
|---|---|---|
| IT | Jim | 90000 |
| Sales | Henry | 80000 |
| IT | Max | 90000 |
In the IT department (id 1), the salaries are 70000 (Joe), 90000 (Jim), and 90000 (Max). The highest salary is 90000, shared by Jim and Max.
In the Sales department (id 2), the salaries are 80000 (Henry) and 60000 (Sam). The highest salary is 80000, earned by Henry.
The output includes Jim and Max for IT, and Henry for Sales, along with their respective salaries and department names.