This is not giving the desired o/p. If finds the max(salary) for medstat,edlev. But it appends this will all the occurances of name,empno. But i want only that employee that has this max salary.
Where as it should only give
The value 104913.36 is correct though.
sel * from retail.employee
qualify rank() over (partition by medstat,edlev order by salary desc) = 1;
The Group By columns are moved into Partition By and MIN/MAX is Order By Asc/Desc.