2026 edition · PDF + cheatsheet

Crack SQL Interviews1,015 questions, worked through.

Built around the SQL questions asked in TCS, Infosys, Wipro, Accenture and product-company rounds, for freshers and experienced engineers alike.

  • 1,015 questions: 495 theory and 520 scenarios on Indian business data like orders, payments, trades and train bookings
  • Every query run on MySQL, PostgreSQL and SQLite, with dialect notes for SQL Server and Oracle
  • 14-day and 30-day study plans, plus a 7-page SQL cheatsheet
MRP ₹1,749₹29983% OFF

One-time payment via Razorpay · Download right after paying · Links emailed to you

Who it's for

A good fit if you are

  • A fresher preparing for campus and off-campus tests and interviews
  • An engineer at a service company aiming for a product company
  • A working professional with an SQL round coming up
  • Switching careers into a data analyst or BI role

Not the right start if

  • You have never written a SELECT query. Learn the basics from any free tutorial first; this book picks up from there.

Three questions from the book

Short ones, and each one catches a lot of candidates.

Chapter 5 · Q.15 · Easy

Can you use a window function in the WHERE clause? Why or why not?

-- This FAILS:
-- SELECT * FROM naukri_applications
-- WHERE ROW_NUMBER() OVER(ORDER BY applied_date) = 1;

-- Correct approach using a subquery:
SELECT * FROM (
  SELECT candidate_name, applied_date,
         ROW_NUMBER() OVER(ORDER BY applied_date) AS rn
  FROM naukri_applications
) sub
WHERE rn = 1;

From the answer: Window functions cannot appear in WHERE. Use a subquery or CTE to filter on window function results.

Why it trips candidates: People who use ROW_NUMBER() every day still write it straight into WHERE under pressure. WHERE runs before SELECT, so the window result doesn't exist yet.

Chapter 1 · Q.115 · Interview Classic

HR wants the second highest salary in employee_directory. Kavya Rao has just joined at 28 LPA, the same salary as the current top earner. The answer must be the second highest distinct salary.

SELECT DISTINCT salary_lpa
FROM employee_directory
ORDER BY salary_lpa DESC
LIMIT 1 OFFSET 1;

From the answer: Leaving out DISTINCT: the sorted list starts 28.00, 28.00, 24.00, so OFFSET 1 reports the top salary again. The book also gives the SQL Server form (OFFSET … FETCH NEXT).

Why it trips candidates: Everyone has seen this question, so the interviewer adds a tie. The memorised answer returns the wrong number.

Chapter 1 · Q.39 · Medium

Why does NOT IN return no rows when the list contains a NULL value?

-- This returns NO rows because of NULL in the list
SELECT name FROM employee_directory
WHERE dept_id NOT IN (1, 2, NULL);

From the answer: NOT IN with NULL in the list always returns empty results. Use NOT EXISTS instead.

Why it trips candidates: The query runs without an error and simply returns nothing. In a test with hidden cases, a single NULL in a subquery fails you silently.

What every answer includes

The scenario

A business problem on the book's practice tables, and a line on what it is testing.

The solution

A complete query you can paste and run, not a fragment.

Real output

The result table from running the query on the practice data. A few design and tuning answers have no rows to show and say so.

The common mistake

The wrong answer most people give, and why it's wrong.

The key insight

The one idea to remember when the question comes back in a different form.

Dialect notes

Where engines differ, the MySQL, PostgreSQL, SQL Server, Oracle or SQLite version of the query.

Theory questions get a written answer, an SQL example and a key point.

What's inside the SQL Interview Kit

1,015

questions: 495 theory, 520 scenario

311 / 470 / 234

easy / medium / hard

1,106

A4 pages, with clickable contents

10 topic chapters + interview strategy

  1. 1. SQL Foundations116 Q
  2. 2. Joins & Relationships116 Q
  3. 3. Aggregations & Grouping107 Q
  4. 4. Subqueries & CTEs106 Q
  5. 5. Window Functions111 Q
  6. 6. DDL & Constraints95 Q
  7. 7. Functions, Procedures & Triggers99 Q
  8. 8. Transactions & Concurrency85 Q
  9. 9. Database Design & Normalization85 Q
  10. 10. Indexing & Query Optimization95 Q
  11. 11. SQL in Real Interviews: strategy and 10 query patterns

Also in the book

  • Two study plans: a 14-day crash plan and a 30-day deep dive, each day mapped to a question range
  • "Interview Classics" in chapters 1-7: Nth highest salary, deleting duplicates, streaks, calendar gaps and more
  • A revision checklist, top mistakes and 5 must-practise questions at the end of chapters 1-10
  • Appendix A: SQL cheatsheet
  • Appendix B: company index, questions grouped by the 65 companies whose tests they are typical of
  • Appendix C: schemas, ER diagrams and the practice script, which loads on MySQL, PostgreSQL and SQLite

What happens after you buy

1

Pay with Razorpay

UPI, card or net banking. Enter the name and email you want on your copy.

2

Get your links

Download links show up straight away, and the same links arrive by email.

3

Download your PDFs

The book and the cheatsheet, each page stamped with your name, email and order number.

How it compares

YouTubeFree PDFsVideo coursesThis kit
Searchable text you keep offlineNoYesDepends on the courseYes, two PDFs
Every query run on MySQL, PostgreSQL and SQLiteVariesVariesVariesYes, all 1,015
Dialect notes for five databasesVariesVariesVariesYes, where engines differ
Day-by-day plan tied to specific questionsVariesVariesUsually a course outline14- and 30-day plans
Practice data you can load yourselfVariesVariesVaries35 tables, one script
CostFreeFreeVaries₹299 once

Bonus: SQL cheatsheet

A separate 7-page PDF for the night before the test.

INCLUDED
  • The order SQL actually runs a query in, as a diagram
  • Six join types, drawn
  • ROW_NUMBER vs RANK vs DENSE_RANK side by side
  • CTEs (including recursive) and the NULL rules that trip people up
  • 18 everyday tasks written for MySQL, PostgreSQL, SQL Server, Oracle and SQLite

One price, no subscription

Pay once and download both PDFs.

SQL Interview Kit

MRP ₹1,749₹29983% OFF

One-time payment · PDF download

  • Crack SQL Interviews 2026: 1,015 questions, 1,106 pages
  • Bonus: 7-page SQL cheatsheet
  • 14-day and 30-day study plans
  • 35 practice tables and the script to load them
  • Download any time from My Purchases on talentd.in
  • Lifetime access and every future edition free
Buy now for ₹299

Checkout on talentd.in, our parent site · Razorpay · UPI, cards, net banking

Digital download, so all sales are final. Refund policy

Licensed to you: each copy carries the buyer's name, email and order number on every page. Please don't share or resell it.

Frequently asked questions

The kit is sold through Talentd (talentd.in), the team behind InterviewKits. You pay with your Talentd account, and the book and cheatsheet are then in My Purchases on talentd.in, where you can download them any time. We also email you download links.
Download from My Purchases on talentd.in instead; it doesn't expire. If something still doesn't work, write to [email protected] with your order number.
Yes. About a quarter of the questions are rated hard, and the later chapters cover transactions and isolation levels, database design and normalisation, indexing and query plans: the topics product-company rounds and experienced-hire interviews lean on.
Standard SQL. Every query was run on MySQL 8.4, PostgreSQL 17 and SQLite, and 842 of the 1,015 questions run unchanged on all three. Where databases differ (dates, upserts, procedures, locking), the answer is in MySQL with dialect notes for PostgreSQL, SQL Server, Oracle and SQLite. The SQL Server notes were run on SQL Server 2022; the Oracle notes are checked against Oracle's documentation.
Nobody can promise that. Each question is tagged with the companies whose tests it is typical of, and Appendix B groups them by company, so you can spend your time where it counts.
Please don't. Each copy is licensed to the buyer: your name, email and order number are printed on every page, and the file is locked against editing.
Yes. ₹299 once, no subscription.
No. The book is a digital download, so all sales are final. If a file won't open or a link doesn't work, write to [email protected] and we'll fix it.
Yes. Your purchase includes lifetime access and every future edition free. When we release a new edition, we email it to you. If you lose your copy, write to [email protected] with your order number, any time, for a fresh link.
Yes. It's an A4 PDF with clickable contents, so it opens on any phone, tablet or laptop. Code blocks are easier to read on a bigger screen.
Through Razorpay: UPI, cards, net banking and wallets. We never see or store your card details.

Practise the questions,
not just the syntax.

MRP ₹1,749₹29983% OFF
Get the SQL Interview Kit for ₹299