What interviewers test in a SQL developer interview
Most loops include live query writing on a sample schema, conceptual questions on indexes and transactions, and a performance tuning scenario. Senior roles add schema design and production troubleshooting.
Interviewers look for correctness first, then performance awareness: whether you think about indexes, cardinality and how a query will behave with millions of rows.
- Querying: joins, subqueries, CTEs, window functions and set operators
- Design: normalisation, keys, constraints and data types
- Performance: indexes, execution plans, statistics and sargability
- Programmability: stored procedures, functions, triggers and error handling
- Concurrency: transactions, isolation levels, locking and deadlocks
Technical topics to revise
Practise on a realistic schema with orders, customers, products and employees. Write each query, then check its execution plan and see how adding an index changes it.
- INNER, LEFT, RIGHT, FULL and CROSS joins, self joins and anti joins
- ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD and running totals with SUM OVER
- Recursive CTEs for hierarchies like employee and manager
- Clustered, non-clustered, covering and filtered indexes
- Execution plans: seeks versus scans, key lookups and estimated versus actual rows
- ACID, isolation levels and snapshot isolation
- TRY CATCH, transactions in stored procedures and MERGE
- Partitioning and archiving large tables
How to structure your answers
For query questions, confirm the expected output and edge cases such as ties, nulls and duplicates before writing. Then write the query step by step and explain why it is correct.
For tuning stories, give before and after numbers, such as execution time, logical reads or CPU, and explain the root cause you found.
How InterviewPlan AI helps you prepare
SQL mock interviews ask query, indexing and tuning questions and give feedback on your reasoning. Coding help lets you review practice queries, and Resume AI highlights performance improvements you delivered.
Interview Copilot provides live speaker-labelled transcription and resume-grounded answer drafts in under a second. Once hired, SQL Job Support gives live expert-plus-AI help with tickets and query tuning in your first 90 days, at $5 per hour with 200 AI credits included.