Skill Roadmap

SQL

SQL is the standard language for talking to relational databases — it sits behind almost every backend, analytics pipeline, and reporting tool in production. This roadmap walks you from basic syntax through joins, subqueries, and functions, up to views, transactions, and the performance tuning that separates a working query from a fast one.

What skills does SQL cover?

From reading a single table to reasoning about query performance

SQL (Structured Query Language) is how you read from and write to a relational database. Almost every backend, data, or analytics role expects it — whether you're calling it from an ORM, writing reports directly against a warehouse, or tuning a slow query in production.

The core split is between Data Definition Language (DDL), which shapes the schema — tables, constraints, indexes — and Data Manipulation Language (DML), which reads and writes the rows inside it. Most day-to-day work lives in DML: SELECT statements, joins, aggregates, and subqueries.

Once the basics are solid, the ceiling is high: window functions, common table expressions, recursive queries, and query optimization are what separate someone who can write a query from someone who can write a query that scales.

The SQL Roadmap

Work through these in order — each step builds on the one before it

STEP 1

Learn the Basics

What a relational database is, and the syntax every query is built from.

Relational Databases RDBMS Benefits & Limitations SQL vs NoSQL Databases Basic SQL Syntax SQL Keywords Data Types Operators SELECT, INSERT, UPDATE, DELETE
STEP 2

Data Definition Language (DDL)

Shape the schema itself — creating, changing, and removing tables.

Create Table Alter Table Truncate Table Drop Table
STEP 3

Data Manipulation Language (DML)

Reading and writing rows — the part of SQL you'll use every day.

SELECT FROM / WHERE GROUP BY / ORDER BY / HAVING JOINs INSERT, UPDATE, DELETE
STEP 4

Aggregate Queries

Collapse many rows into a summary — totals, averages, and counts.

SUM COUNT AVG MIN MAX GROUP BY HAVING
STEP 5

Data Constraints

Rules that keep bad data out of the table in the first place.

Primary Key Foreign Key Unique NOT NULL CHECK
STEP 6

JOIN Queries

Combine rows across tables — the core skill for querying real schemas.

INNER JOIN LEFT JOIN RIGHT JOIN FULL OUTER JOIN Self Join Cross Join
STEP 7

Subqueries

A query nested inside another — useful once a single SELECT isn't enough.

Scalar Column Row Table Nested Subqueries Correlated Subqueries
STEP 8

Advanced Functions

Built-in functions for numbers, strings, conditionals, and dates.

Numeric
FLOOR ABS MOD ROUND CEILING
String
CONCAT LENGTH SUBSTRING REPLACE UPPER / LOWER
Conditional
CASE NULLIF COALESCE
Date & Time
DATE / TIME / TIMESTAMP DATEPART DATEADD
STEP 9

Views & Indexes

Saved queries for reuse, and structures that make lookups fast.

Creating Views Modifying Views Dropping Views Managing Indexes Query Optimization
STEP 10

Transactions & Data Integrity

Keep changes atomic and consistent, and control who can touch what.

BEGIN / COMMIT / ROLLBACK SAVEPOINT ACID Transaction Isolation Levels GRANT and REVOKE DB Security Best Practices Stored Procedures & Functions
STEP 11

Performance Optimization

Make queries fast at scale, not just correct on a small table.

Using Indexes Optimizing Joins Reducing Subqueries Selective Projection Query Optimization Techniques Query Analysis Techniques
STEP 12

Advanced SQL

The patterns that show up in interviews and in serious analytics work.

Recursive Queries Pivot / Unpivot Operations Common Table Expressions Dynamic SQL
Window Functions
ROW_NUMBER RANK DENSE_RANK LEAD / LAG

GitHub Projects

Real, buildable projects to put on your own GitHub

Frequently Asked Questions

Common questions from people starting out with SQL

Is SQL easy to learn?

The basics — SELECT, WHERE, simple joins — are approachable within a few days, since the syntax reads close to plain English. What takes longer is developing intuition for joins across many tables, subqueries, and writing queries that stay fast as data grows.

Do I need to learn SQL if I already use an ORM?

Yes. ORMs are convenient for common cases, but debugging slow queries, writing complex reports, or reasoning about an execution plan all require reading and writing raw SQL directly.

What's the difference between SQL and NoSQL?

SQL databases store data in structured tables with fixed schemas and enforce relationships between them; NoSQL databases like MongoDB favor flexible, often document-based structures. SQL tends to win on complex queries and data integrity, NoSQL on horizontal scaling and schema flexibility.

What's the difference between WHERE and HAVING?

WHERE filters individual rows before any grouping happens; HAVING filters groups after a GROUP BY and aggregate functions have been applied. A common mistake is trying to filter on an aggregate like COUNT() with WHERE — that has to go in HAVING instead.

Which JOIN should I use?

Use INNER JOIN when you only want rows that match in both tables, LEFT JOIN when you want every row from the first table regardless of a match, and FULL OUTER JOIN when you want unmatched rows from either side. Self and cross joins are for narrower, less common cases.

How do I prepare for a SQL interview?

Be comfortable writing joins and aggregates from memory, understand subqueries versus CTEs, practise window functions like ROW_NUMBER and RANK, and be ready to explain how you'd optimize a slow query — indexes, execution plans, and reducing unnecessary subqueries are common talking points.

Track complete

From a single SELECT to window functions and query tuning — that's the range most database-facing roles expect. Keep practising against real schemas, and let the direction you're headed (backend, analytics, or database administration) guide which parts you go deeper on.

Where next?

Keep exploring by domain or drill into a single skill