Interactive Brokers uses SQL assessments when evaluating engineers who may support Trader Workstation and Client Portal systems. Write a PostgreSQL query to identify candidates who achieved the second-highest distinct mark on the SQL-CORE assessment.
Requirements
- Consider only graded
SQL-CORE records with non-NULL marks.
- Rank distinct marks from highest to lowest and return the second-highest mark.
- Return every candidate tied at that mark, including
candidate_id, candidate_name, and marks.
- Sort the result by
candidate_id in ascending order.