
Learn SQL
SQL is the language of databases. Every app โ from Instagram to your bank โ stores data in tables and uses SQL to find it. Learn to query, filter, join, and analyse data like a professional.
SQL at a Glance
SQL reads almost like English. Ask a question, get a table of results back.
SELECT name, age, city
FROM students
WHERE age >= 18
AND city = 'Cape Town';โถ Result
name | age | city --------|-----|---------- Alice | 20 | Cape Town Charlie | 22 | Cape Town
SELECT city, COUNT(*) AS total_students
FROM students
GROUP BY city
ORDER BY total_students DESC;โถ Result
city | total_students --------------|--------------- Johannesburg | 8 Cape Town | 5 Durban | 3
SELECT students.name, courses.title
FROM students
INNER JOIN enrolments
ON students.id = enrolments.student_id
INNER JOIN courses
ON enrolments.course_id = courses.id;โถ Result
name | title --------|------------------ Alice | Web Development Bob | Data Science Alice | Python Basics
What You'll Learn
Six beginner-friendly modules โ from your first SELECT to advanced JOINs.
SELECT Basics
- SELECT & FROM
- Choosing columns
- SELECT *
- Column aliases (AS)
Filtering with WHERE
- WHERE clause
- Comparison operators
- AND, OR, NOT
- LIKE & wildcards
Sorting & Limiting
- ORDER BY
- ASC & DESC
- LIMIT & OFFSET
- TOP (SQL Server)
Aggregate Functions
- COUNT, SUM, AVG
- MIN & MAX
- GROUP BY
- HAVING
JOINs
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- Joining on keys
Modifying Data
- INSERT INTO
- UPDATE SET
- DELETE FROM
- CREATE TABLE

SQL is just the beginning
Once you know SQL, explore PostgreSQL for advanced features, MongoDB for document databases, and Redis for lightning-fast caching.
Frequently Asked Questions
What is SQL used for?
SQL (Structured Query Language) is used to talk to databases. Any time you log in to a website, search for a product, or see your profile โ a SQL query is running behind the scenes to fetch your data.
Which database should I learn with?
The core SQL syntax is almost identical across all databases. Start with SQLite (built into Python and many tools, zero setup) or MySQL. Everything you learn transfers directly to PostgreSQL, SQL Server, and others.
Do I need to know programming first?
No! SQL is one of the most beginner-friendly technical skills. It reads almost like a plain English question โ "SELECT name FROM students WHERE age > 18" literally says what it does.
What jobs use SQL?
Data analyst, data scientist, backend developer, database administrator, business analyst, product manager, financial analyst โ almost every technical role touches SQL at some point.
Ready to query your first database?
Free. No signup. No downloads. Just start.
Start Learning SQLNo account required ยท Always free
The Story of SQL
Real history, real companies, and an honest look at where SQLshines and where it doesn't โ not just a feature list.
Where it came from
SQL was developed at IBM in the early 1970s by Donald Chamberlin and Raymond Boyce, based on Edgar Codd's 1970 paper proposing the relational model for databases โ the idea that data should be organised into tables with defined relationships, rather than the more rigid hierarchical database structures common at the time. It became an ANSI standard in 1986 and, remarkably, the core syntax has barely changed since.
How itโs actually used today
SQL is how virtually every application on Earth that stores structured data โ bank transaction records, hospital patient systems, e-commerce orders, airline booking systems โ actually retrieves and updates that data. Even NoSQL-first companies typically run SQL databases somewhere in their stack for data that genuinely fits a relational structure, like financial records.
Strengths & trade-offs
SQL's declarative style โ you describe what data you want, not how to fetch it โ means the database engine handles the hard optimisation work for you, which is a huge advantage for anyone who isn't a database internals expert. Its limitation shows up with less structured data (deeply nested documents, rapidly changing schemas), which is exactly the gap NoSQL databases like MongoDB were built to fill.
What to learn next
PostgreSQL is the natural next step for going beyond basic SQL syntax into a real, production-grade database engine with advanced features. Pairing SQL with a back-end language โ Python or Node.js are the most common choices โ is how you go from writing queries to building actual applications.