SQL and MySQL interview questions from fresher to senior level: joins, GROUP BY and HAVING, NULL handling, indexes, transactions and isolation levels, window functions, query tuning with EXPLAIN, InnoDB internals and replication, each with an explanation.
SQL interview questions for freshers and students: SELECT basics, WHERE vs HAVING, joins, GROUP BY, keys, NULL handling, normalisation, indexes and ACID. Each answer explains why the other options are wrong.
SQL and MySQL interview questions for developers with a few years' experience: LEFT JOIN counts, NOT IN and NULL, composite indexes, window functions, isolation levels, deadlocks, EXPLAIN and SQL injection.
Advanced MySQL interview questions for senior engineers and DBAs: replication lag, partitioning vs sharding, online schema changes, UUID keys and the clustered index, SKIP LOCKED queues, redo logs, next-key locks and MVCC.
SQL interviews test whether you can get the right rows back and explain what the database does to find them. Fresher rounds check the foundations: SELECT, WHERE versus HAVING, joins, GROUP BY, keys and constraints, and why = NULL never matches. Intermediate rounds add indexes and the leftmost-prefix rule, window functions such as DENSE_RANK, subqueries, transactions, isolation levels and deadlocks, and reading an EXPLAIN plan. Senior rounds focus on running MySQL in production: InnoDB's clustered index, MVCC and locking, replication lag, online schema changes, partitioning and sharding.
Each paper below has practice questions with the answer and an explanation of why the other options are wrong, then a timed test that draws from a larger bank, so every attempt is different. The SQL coding problems run your query in the browser against test tables, and you can play the questions as a level-up game. Queries use standard SQL that also runs on MySQL 8; MySQL-only behaviour is called out where it matters.
How to prepare with these quizzes
Practise first. Each quiz page lists every question with its answer and explanation hidden until you open it.
Take the timed test. One question at a time, a timer, a question map, and “mark for review”, like an online assessment round.
Read your report. Your score, pass mark, time taken, and which topics and difficulty levels you dropped marks on.
Retry what you got wrong. Rerun only the missed questions until they stick. Your past scores are saved to your account, on My tests.