79783447

Date: 2025-10-06 07:56:36
Score: 1
Natty:
Report link

Well, another simple query that works for this problem:

SELECT IFNULL(
    (select distinct salary
    from Employee 
    order by salary desc
    limit 1
    offset 1)
, null
) as SecondHighestSalary 

But practice with different approaches is great here

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Сергей Беляев