GROUP BY HAVING not working for multiple highest salary, why?
SELECT b.Name as Department, a.Name as Employee, a.Salary\nFROM Employee a\nJOIN Department b\nON a.DepartmentId = b.Id\nGROUP BY Department\nHAVING a.Salary = 
`SELECT b.Name as Department, a.Name as Employee, a.Salary\nFROM Employee a\nJOIN Department b\nON a.DepartmentId = b.Id\nGROUP BY Department\nHAVING a.Salary = max(a.Salary)`\n\nThis way it was not able to return multiple rows with same highest salary. I can't figure why, please help!
[]