DevTrackSPEC
●3d
← Back to Practice Arena
● SAFE IN-MEMORY DB (ISOLATED)
RELATIONAL DATA // SCHEMA VERIFICATION

SQL Practice Sandbox

Real technical interview SQL questions. Study schemas, write queries, and verify output against expected results without risk to production databases.

ISOLATED IN-MEMORY SANDBOX // NO PRODUCTION IMPACT
Aggregations & Subquerieseasy

Find the Second Highest Salary

Write a SQL query to report the second highest distinct salary from the Employee table. If there is no second highest salary, return null.

DATABASE SCHEMAS
Employee
5 rows
id(INT)
name(VARCHAR(50))
salary(INT)
department_id(INT)
idnamesalarydepartment_id
1Alice950001
2Bob1100001
3Charlie850002
EXPECTED RESULT TABLE
SecondHighestSalary
95000

SQL QUERY SPEC