clean code, I was upset about the discussion, none was clear.
Upvote if you like the cleanliness!! \n\nwith cte as(\nselect d.Name as Department, \n    e.Name as Employee, \n    e.Salary as Salary,\n    rank() over(partiti
Upvote if you like the cleanliness!! \n\nwith cte as(\nselect d.Name as Department, \n    e.Name as Employee, \n    e.Salary as Salary,\n    rank() over(partition by d.Name Order by Salary desc) as ranks\n    from Employee e inner join Department d on d.Id = e.Departmentid)\n    \nselect \nDepartment,\nEmployee, \nSalary\nfrom cte\nWhere ranks = 1
[]