Available question text
Given an Employee table of salaries, write an SQL query to return the second-highest distinct salary (or NULL if fewer than two distinct salaries), correctly handling duplicate salary values and edge cases. This requires selecting the second maximum distinct value—typically approached with ranking functions or subqueries.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3338. Second Highest Salary II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source