My solution is not working


  • 0
    Y

    I am new to SQL, my answer is not working

    select Salary from (select * from Employee order by Salary desc limit 2) order by Salary asc limit 1

    I also tried

    select top (select * from Employee order by Salary desc limit 2) order by Salary asc


  • 0
    M

    select Salary from (select * from Employee order by Salary desc limit 2)as T order by Salary limit 1


  • 0
    S

    perhaps mysql does't support it. select from ( select ...) where .


Log in to reply
 

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