learn deep. ship safe.Practice testsFollow ByteMunSubscribe

Interview prep

SQL and MySQL interview questions

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.

  • 3 test papers
  • 30 practice questions
  • Answers explained
  • Updated
Play SQL and MySQL level by level5 questions a level, easy to hard. Pass 4 to unlock the next and collect coins.

Choose your level

Start where you are; each paper is 12 questions with a timer and a topic-by-topic report.

Practise coding problems too

Most backend and data rounds include a live SQL task. Write the query, run it against test tables in your browser, then read a full solution.

Browse coding problems

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

  1. Practise first. Each quiz page lists every question with its answer and explanation hidden until you open it.
  2. Take the timed test. One question at a time, a timer, a question map, and “mark for review”, like an online assessment round.
  3. Read your report. Your score, pass mark, time taken, and which topics and difficulty levels you dropped marks on.
  4. Retry what you got wrong. Rerun only the missed questions until they stick. Your past scores are saved to your account, on My tests.