MySQL solution using join
\nSELECT D.NAME AS DEPARTMENT,\nE.NAME AS EMPLOYEE,\nE.SALARY\nFROM EMPLOYEE E\nJOIN DEPARTMENT D ON \nE.DEPARTMENTID = D.ID\nWHERE SALARY = (SELECT MAX(SALARY)
```\nSELECT D.NAME AS DEPARTMENT,\nE.NAME AS EMPLOYEE,\nE.SALARY\nFROM EMPLOYEE E\nJOIN DEPARTMENT D ON \nE.DEPARTMENTID = D.ID\nWHERE SALARY = (SELECT MAX(SALARY) FROM EMPLOYEE WHERE D.ID = EMPLOYEE.DEPARTMENTID);\n```\n\nPlease upvote if you find it useful.
['MySQL']