Based on what I have heard from friends and other online users and from my own personal experience, the most common job interview question for database programmers is “How do you find the highest salary in an employee table?”
This question tests a candidate’s knowledge of ranking functions, subqueries, common table expression (CTE) and basic SQL.
We will explore the answer with a series of scenarios and questions asked in relation to finding the highest, lowest, and nth highest salary.