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
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
questions: 495 theory, 520 scenario
easy / medium / hard
A4 pages, with clickable contents
10 topic chapters + interview strategy
- 1. SQL Foundations116 Q
- 2. Joins & Relationships116 Q
- 3. Aggregations & Grouping107 Q
- 4. Subqueries & CTEs106 Q
- 5. Window Functions111 Q
- 6. DDL & Constraints95 Q
- 7. Functions, Procedures & Triggers99 Q
- 8. Transactions & Concurrency85 Q
- 9. Database Design & Normalization85 Q
- 10. Indexing & Query Optimization95 Q
- 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
Pay with Razorpay
UPI, card or net banking. Enter the name and email you want on your copy.
Get your links
Download links show up straight away, and the same links arrive by email.
Download your PDFs
The book and the cheatsheet, each page stamped with your name, email and order number.
How it compares
| YouTube | Free PDFs | Video courses | This kit | |
|---|---|---|---|---|
| Searchable text you keep offline | No | Yes | Depends on the course | Yes, two PDFs |
| Every query run on MySQL, PostgreSQL and SQLite | Varies | Varies | Varies | Yes, all 1,015 |
| Dialect notes for five databases | Varies | Varies | Varies | Yes, where engines differ |
| Day-by-day plan tied to specific questions | Varies | Varies | Usually a course outline | 14- and 30-day plans |
| Practice data you can load yourself | Varies | Varies | Varies | 35 tables, one script |
| Cost | Free | Free | Varies | ₹299 once |
Bonus: SQL cheatsheet
A separate 7-page PDF for the night before the test.
- 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
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
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.