The top 40 SQL interview questions for freshers and experienced in 2026 cover eight clusters: SELECT/WHERE/ORDER BY basics (22%), JOINs (25%), GROUP BY + HAVING (12%), subqueries (10%), indexes and query optimization (10%), window functions ROW_NUMBER/RANK/DENSE_RANK (8%), transactions and ACID (7%), and normalization 1NF/2NF/3NF (6%). Most fresher interviews (TCS NQT, Infosys InfyTQ, Cognizant GenC) dedicate one full coding round to SQL JOIN queries, plus 8–12 MCQs on output prediction. This guide gives you all 40 questions with concise answers and 12 working SQL examples you can run on MySQL or PostgreSQL.
Table of Contents
- SQL Topic Weightage in 2026 Fresher Interviews
- Company Round Formats (TCS / Infosys / Cognizant)
- SQL Basics (Q1–Q8)
- JOINs Explained (Q9–Q15)
- GROUP BY, HAVING, Aggregation (Q16–Q20)
- Subqueries & CTEs (Q21–Q25)
- Window Functions (Q26–Q30)
- Indexes & Performance (Q31–Q34)
- Transactions & ACID (Q35–Q37)
- Normalization (Q38–Q40)
- 3-Week SQL Interview Prep Plan
SQL Topic Weightage in 2026 Fresher Interviews
| Topic Cluster | Frequency in Coding Round | Frequency in MCQ Round |
|---|---|---|
| SELECT, WHERE, ORDER BY, DISTINCT | 15% | 30% |
| JOINs (INNER, LEFT, RIGHT, SELF) | 35% | 20% |
| GROUP BY + HAVING, aggregate functions | 15% | 12% |
| Subqueries & CTEs | 12% | 8% |
| Window functions (ROW_NUMBER, RANK) | 8% | 5% |
| Indexes & EXPLAIN plans | 5% | 10% |
| Transactions, ACID, isolation levels | 5% | 10% |
| Normalization 1NF/2NF/3NF | 5% | 5% |
Trend in 2026: Window-function questions doubled in frequency at Infosys InfyTQ and TCS NQT compared to 2024. Expect at least one ROW_NUMBER() or RANK() question in any product-company fresher round.






