Every time you open Swiggy and it remembers your last order, every time IRCTC says "3 seats left", every time your college portal pulls up your marksheet — somewhere, a piece of software just asked a database a question. SQL is the language those questions are written in. In this free course, I'll teach you that language from absolute zero — the way a friend would, with real examples and real outputs at every step.
What is SQL?
SQL stands for Structured Query Language (people say "S-Q-L" or "sequel" — both are fine). It is the standard language for talking to a relational database: you describe what data you want, and the database figures out how to get it. That last part is the magic. You never write loops like "go through each row one by one" — you just say "give me all students with CGPA above 8" and the database does the running around.
SQL was born in the 1970s and is still, half a century later, one of the most-used languages in the world. MySQL, PostgreSQL, Oracle, SQL Server, SQLite — different database products, same core language. In this course I'll use MySQL flavour (the one Indian service companies and most tutorials use), and I'll point out the differences where they matter.
Databases and tables — the two-minute version
Think of a database as a very disciplined godown of information. Inside it, data lives in tables — and a table is just rows and columns, like a register or an Excel sheet. Here is a tiny students table:
| roll_no | name | branch | cgpa |
|---|---|---|---|
| 101 | Ravi Kumar | CS | 8.4 |
| 102 | Priya Singh | EC | 9.1 |
| 103 | Aman Gupta | CS | 7.2 |
| 104 | Neha Sharma | ME | 8.9 |
Each row (also called a record) is one student. Each column (also called a field) is one piece of information about them. Real tables are exactly this — just with lakhs or crores of rows. That's the whole mental model you need to start.
Your first SQL query — right now
Let's not wait. Say I want the names of all CS students from the table above. In SQL, I literally write that sentence:
SELECT name
FROM students
WHERE branch = 'CS';Result
| name |
|---|
| Ravi Kumar |
| Aman Gupta |
Read it aloud: select the name, from the students table, where the branch is CS. SQL is one of the rare languages that reads almost like English — which is why you can become dangerous at it in weeks, not months.
Why learn SQL (the honest version)
Three reasons, no fluff. One: almost every software job touches a database — backend, data analysis, testing, DevOps, even product roles. On day one of your job, someone will say "get me the numbers", and SQL is how you'll get them. Two: nearly every placement test and interview checks it — from Cognizant GenC and TCS NQT to data rounds at Amazon and Flipkart. Three: unlike frameworks that change every two years, SQL you learn today will still be running the world's data twenty years from now. Few skills age this well.
How this course works
Every lesson follows the same rhythm, and it's designed for reading, not skimming:
- Understand first. I start from a situation you already know — a tea shop, a railway counter, a college register — and let you feel the problem before the technical word arrives.
- See it run. Every concept comes with the syntax, a worked example on a real table, and the actual output — so nothing stays abstract.
- Practice at the end. Each lesson closes with a Practice Zone: click-to-answer questions and write-the-query challenges. Under each question you'll see the logos of companies where that exact pattern has been asked — so when you finish a lesson, you know precisely how it shows up in real selection rounds.
The full course roadmap
Twelve topics, in the order I'd learn them. Each is a complete lesson — take them one a day and you'll be genuinely good at SQL in under two weeks.
| # | Lesson | What you'll be able to do |
|---|---|---|
| 1 | SQL Basics | Ask a table anything — SELECT, WHERE, DISTINCT, LIKE, ORDER BY, LIMIT, and NULL handled properly. |
| 2 | Joins | Combine data across tables — INNER, LEFT, RIGHT, FULL, SELF — and dodge the classic join traps. |
| 3 | GROUP BY & HAVING | Summarise lakhs of rows into per-group answers with COUNT, SUM and AVG. |
| 4 | Subqueries | Write queries inside queries — correlated subqueries, EXISTS, and the second-highest-salary classic. |
| 5 | Window Functions | Rank and compare rows without collapsing them. |
| 6 | Set Operations | Stack results with UNION, INTERSECT and EXCEPT. |
| 7 | Constraints & Keys | Design tables that protect themselves from bad data. |
| 8 | Normalization | Split tables the right way — 1NF to BCNF, and when not to. |
| 9 | Indexing & Optimization | Make slow queries fast, and know what that speed costs. |
| 10 | Transactions & ACID | Keep money and data safe when many things happen at once. |
| 11 | Views & CTEs | Name your queries so humans (and future-you) can read them. |
| 12 | DDL, DML, DCL & TCL | Know your command families — and answer DELETE vs TRUNCATE vs DROP in your sleep. |
And once the lessons are done, the sidebar's Company-wise SQL PYQs section is your mock-test layer — real reported questions from TCS, Infosys, Amazon, Google and 14 more companies.
How to study this course
One honest rule: when a question appears, actually attempt it before revealing the answer. Getting it wrong here is free — getting it wrong in a selection round is not. Beyond that: read one lesson at a time, type the example queries into any free tool (MySQL on your laptop, or an online playground like DB Fiddle), and re-do the Practice Zone of the previous lesson before starting a new one. Typing queries with your own fingers is where the learning actually happens.
FAQ
Is SQL hard to learn?
No — it's one of the friendliest languages there is, because it reads like English. The basics take a weekend. What takes practice is the thinking: joins, grouping and subqueries. That's exactly what this course drills, one lesson at a time.
Do I need to know programming before learning SQL?
No. SQL is a great first language. If you can read a table of rows and columns, you can start lesson 1 today.
MySQL, PostgreSQL, Oracle — which one is this course teaching?
The core SQL in this course works everywhere. Where behaviour differs (like LIMIT vs TOP, or how NULLs sort), I use MySQL as the default and call out the difference explicitly — those differences are themselves favourite interview questions.
How long will it take to finish?
One lesson a day = under two weeks. In a hurry for a test? Lessons 1–4 (basics, joins, GROUP BY, subqueries) cover what 80% of fresher SQL rounds actually ask.
Ready? Start with Lesson 1: SQL Basics →

