What is wrong with this solution


  • 0
    L

    select
    case
    when (select count(*) from Employee)>1 then t.Salary
    else null
    end as SecondHighestSalary
    from
    (select * from Employee order by Salary desc limit 2) as t order by Salary asc limit 1


Log in to reply
 

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