BEST solutions || MySQL || Pandas || Beats 100% !!
Code\n\n# Write your MySQL query statement below\nSELECT D.Name AS Department, E.Name AS Employee, E.Salary \nFROM Employee E, Department D \nWHERE E.Department
# Code\n```\n# Write your MySQL query statement below\nSELECT D.Name AS Department, E.Name AS Employee, E.Salary \nFROM Employee E, Department D \nWHERE E.DepartmentId = D.id AND (DepartmentId,Salary) in \n  (SELECT DepartmentId,max(Salary) as max FROM Employee GROUP BY DepartmentId)\n```\n```\nimport pandas as pd\n\ndef department_highest_salary(employee: pd.DataFrame, department: pd.DataFrame) -> pd.DataFrame:\n    data = pd.merge(employee, department, left_on = \'departmentId\', right_on = \'id\', how = \'left\')\n    df = data.groupby(\'name_y\').apply(lambda x: x[x.salary == x.salary.max()])\n    df = df.rename(columns={\'name_y\': \'Department\', \'name_x\': \'Employee\'})\n    df = df.drop(columns=[\'id_x\', \'id_y\']).reset_index()\n    return df[[\'Department\',\'Employee\',\'salary\']]\n```
['MySQL', 'Pandas']