What if I want second highest non-distinct salary?

  • 0

    I know this question asks for distinct value.
    If there are two same top salaries, and I want to return the same value as second highest value.

    What would be the code like? Any idea appreciated

  • 0
    Select MAX(Salary) from Employee where Salary < (Select MAX(Salary) from Employee)

Log in to reply

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