row_number() over()

  • 0

    select * from (
    select row_number() over(partition by e.departmentid order by e.Salary desc) as rank, as Department, as Employee, e.Salary
    from Employee e, Department d
    where e.DepartmentId ) t
    where rank <=3

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.