https://leetcode.com/problems/department-highest-salary/


```mysql
# copied from discuss for learning
select Department.name as Department , Employee.name as Employee, Employee.salary as Salary from Department 
    join Employee 
        on Employee.departmentId = Department.id and 
            Employee.salary = (select max(salary) from Employee where Employee.departmentId = Department.id);
# 'select' here specifying the output table structure
# 'join' here put another table to the first table so we could calculate togather
# 'on' here specifying the join rules, which is only join those who 'departmentId == id'
# 'and' here is also part of the 'join rules', it trys to get the highest salary for a department that has same id`
```


___


https://leetcode.com/problems/department-highest-salary


Go for it, not wait for it.
