What Is SQL & Why Learn It
What SQL stands for, what problem it solves, and why every data career needs it.
An IPL season produces a mountain of data: every ball bowled, every run scored, every ticket sold, every fantasy-team pick and every live score update. One season can easily create tens of millions of rows. You cannot open that in Excel and scroll. To answer a simple question like "total runs by team?" you need a way to ask the data a question and get the answer back in a second. That way is SQL.
Definition
SQL (Structured Query Language) is a standard, declarative language used to create, read, update and delete data stored in a relational database. You describe what result you want, and the database engine works out how to get it.
Let us unpack every word of that definition:
- Structured — the data lives in organised tables made of rows and columns, not in loose text files.
- Query — a query is a question you ask the database (for example, "who scored more than 500 runs?"). The database replies with a result set (a small table of answers).
- Language — SQL is a fixed set of commands and rules (
SELECT,INSERT,CREATE…) that every relational database understands. - Declarative — you do not write loops or step-by-step instructions. You say what you want; the database's query optimizer decides the fastest way to fetch it.
Note: You can pronounce it "S-Q-L" (ess-cue-el) or "sequel". Both are correct and both are used in interviews.
One question, one answer
Imagine the IPL data is stored in a table called players. You want to know "Who scored over 500 runs?". In SQL you write:
sql
SELECT name, runs
FROM players
WHERE runs > 500;The database returns:
| name | runs |
|---|---|
| Virat Kohli | 750 |
| Jos Buttler | 850 |
| David Warner | 700 |
Read it almost like English: "select the name and runs from the players table where runs is greater than 500." That readability is a big reason SQL has survived for more than 50 years.
One language, many databases
SQL is an ANSI/ISO standard, so the same core language works across many database products:
| Database product | Company / project | SQL flavour (dialect) |
|---|---|---|
| SQL Server | Microsoft | T-SQL (Transact-SQL) — used in this course |
| MySQL | Oracle (open source) | MySQL SQL |
| PostgreSQL | Open source | PL/pgSQL for procedures |
| Oracle Database | Oracle | PL/SQL |
| SQLite | Open source (used in phones & this site's playground) | SQLite SQL |
About 90% of everyday SQL is identical everywhere. Each product adds a few extras of its own (for example, SQL Server writes SELECT TOP 3 while MySQL writes LIMIT 3). Learn one dialect well and switching to another takes a few hours, not months.
Why learn SQL?
| Reason | What it means for you |
|---|---|
| Talk to data | Ask any relational database any question: filter, summarise and combine data from many tables. |
| High demand | SQL appears in job descriptions for Software Developer, Data Analyst, Data Scientist and Data Engineer roles. |
| Industry standard | The tools you will meet speak SQL: Power BI, Tableau, Azure Synapse, Snowflake, Spark SQL, Kafka (ksqlDB) and more. |
Even if you become a Python developer or a data scientist, the data you work with will almost always come out of a database — and SQL is the key to that door.
What you can do with SQL
- Read data — "show me all MI players" (
SELECT) - Add data — "a new player joined RCB" (
INSERT) - Change data — "update Kohli's runs after today's match" (
UPDATE) - Remove data — "delete a cancelled match" (
DELETE) - Build structure — "create a new table for ticket sales" (
CREATE TABLE) - Control access — "let the analyst read but not delete" (
GRANT)
Common mistakes
- ❌ Thinking SQL is a database. ✅ SQL is the language; SQL Server, MySQL and PostgreSQL are the database software that understands it.
- ❌ Thinking SQL runs top-to-bottom like Python. ✅ SQL is declarative — the engine decides the order (you will learn the real execution order in Chapter 2).
- ❌ Learning "MySQL" and "SQL Server" as two separate languages. ✅ Learn standard SQL first; the dialect differences are small.
Interview tip
Q: Is SQL a programming language? A: SQL is a declarative query language, not a general-purpose programming language like Python or Java. You describe the result you want and the database decides how to produce it. Vendor extensions such as T-SQL and PL/SQL add procedural features (variables, loops, IF), which is why people sometimes call them programming languages.
Key points to remember
- SQL = Structured Query Language: a standard language to create, read, update and delete data in relational databases.
- SQL is declarative — you say WHAT result you want, and the database engine decides HOW to get it.
- A query is a question to the database; the answer comes back as a result set (a table).
- SQL is an ANSI/ISO standard used by SQL Server, MySQL, PostgreSQL, Oracle and SQLite — each adds its own small dialect.
- This course uses SQL Server's dialect, called T-SQL (Transact-SQL).
- SQL is needed by developers, data analysts, data scientists and data engineers, and powers tools like Power BI, Tableau and Snowflake.
- SQL is the language; SQL Server/MySQL/PostgreSQL are the database products that understand it.
Try it yourself
Your first query: who scored over 500?
Runs on a fresh IPL practice database in your browser · edit the query and press Ctrl + Enter
Look at the whole players table
Runs on a fresh IPL practice database in your browser · edit the query and press Ctrl + Enter
Practice: ask your own question
Runs on a fresh IPL practice database in your browser · edit the query and press Ctrl + Enter
Revision Flashcards
Tap a card to flip it and see the answer.
