Employee
table.LIMIT 1 OFFSET 1
to get the second highest salary.IFNULL
to handle the case where there is no second highest salary, returning NULL
in such a case.employee
DataFrame to ensure uniqueness.None
to indicate the absence of a second highest salary.erDiagram Employee { int id PK int salary }