Data

SQL Roadmap: Step-by-Step Guide for 2026

This SQL roadmap shows you how to query, combine and analyse data step by step, from your first SELECT statement to advanced queries and database design.

Steps8Time2 to 4 monthsLevelBeginner to job-ready

What is a SQL Developer?

SQL (Structured Query Language) is the standard language for working with relational databases. A SQL developer writes queries to store, find, update and analyse data, and designs databases that keep data accurate and fast to access.

SQL is used by backend developers, data analysts, data scientists and business intelligence teams. It is one of the most useful skills in tech because almost every company stores its important data in a SQL database.

How to use this sql roadmap

Follow this SQL roadmap in order. Each step adds new query skills on top of the previous ones.

Practise on a real sample database such as an online store. Answering real business questions is the best way to learn SQL.

1Step 1: Databases and tables

Learn what a relational database is and how data is organised in tables.

What is it?

A relational database stores data in tables. Each row is one record, each column is one field, and a primary key uniquely identifies each row.

What to learn

Tables, rows and columnsData typesPrimary keysInstalling PostgreSQL or MySQLA SQL client

PostgreSQL is a great free choice for learning and is widely used in jobs.

Example

sql

CREATE TABLE customers (
  id SERIAL PRIMARY KEY,
  name TEXT NOT NULL,
  city TEXT,
  joined_on DATE DEFAULT CURRENT_DATE
);

Create a customers table with an automatic id and a join date.

Practice project: Create a database for a small shop with customers and products tables.

Helpful resource: PostgreSQL tutorial

2Step 2: Basic queries

Read data with SELECT and filter, sort and limit the results.

What is it?

SELECT chooses which columns to show, WHERE filters rows, ORDER BY sorts them and LIMIT returns only the first few.

What to learn

SELECTWHEREORDER BYLIMITDISTINCTComparison operators

Most SQL work is reading data. Practise SELECT until you can write simple queries without thinking.

Example

sql

SELECT name, city
FROM customers
WHERE city = 'Dubai'
ORDER BY joined_on DESC
LIMIT 10;

Show the ten newest customers from Dubai.

Practice project: Write ten queries that answer simple questions about your shop data.

Helpful resource: W3Schools SQL tutorial

3Step 3: Changing data

Insert, update and delete data safely.

What is it?

INSERT adds rows, UPDATE changes them and DELETE removes them. A transaction groups several changes so they all succeed or all fail together.

What to learn

INSERTUPDATEDELETETransactionsConstraints

Always use WHERE with UPDATE and DELETE, and test on a copy of the data first.

Example

sql

BEGIN;
UPDATE products SET price = price * 1.10 WHERE category = 'Shoes';
COMMIT;

Raise shoe prices by 10% inside a safe transaction.

Practice project: Add products, update prices and remove test data using a transaction.

Helpful resource: PostgreSQL: Transactions

4Step 4: Aggregation and grouping

Summarise data with totals, averages and counts.

What is it?

Aggregate functions turn many rows into one number. GROUP BY calculates them separately for each group, and HAVING filters those groups.

What to learn

COUNT, SUM, AVGMIN and MAXGROUP BYHAVING

GROUP BY is the heart of reporting. Practise it with many different questions.

Example

sql

SELECT category, SUM(amount) AS revenue
FROM sales
GROUP BY category
HAVING SUM(amount) > 5000
ORDER BY revenue DESC;

Show revenue per category, only for categories above 5,000.

Practice project: Create a monthly sales report by product category.

Helpful resource: PostgreSQL: Aggregate functions

5Step 5: Joins

Combine data from several tables.

What is it?

A join combines rows from two tables using a shared column. INNER JOIN keeps only matching rows, while LEFT JOIN keeps every row from the first table.

What to learn

INNER JOINLEFT JOINForeign keysSelf joinsJoining many tables

Draw your tables and how they connect before writing a join. It makes complex queries much clearer.

Example

sql

SELECT o.id, c.name, o.total
FROM orders o
LEFT JOIN customers c ON c.id = o.customer_id;

Show each order with its customer’s name.

Practice project: List every order with its customer name and product details.

Helpful resource: PostgreSQL: Joins

6Step 6: Advanced queries

Write powerful queries for analysis and reporting.

What is it?

Window functions calculate values across related rows without grouping them away, for example ranking or running totals.

What to learn

SubqueriesCTEs (WITH)Window functionsCASEDate functions

Window functions are often asked about in data interviews. They are worth mastering.

Example

sql

SELECT name, city, total_spent,
       RANK() OVER (PARTITION BY city ORDER BY total_spent DESC) AS city_rank
FROM customer_totals;

Rank customers from highest to lowest spender in each city.

Practice project: Rank customers by spending within each city.

Helpful resource: PostgreSQL: Window functions

7Step 7: Database design and performance

Design clean databases and make queries fast.

What is it?

Normalisation splits data into tables to avoid duplication. Indexes work like a book index, letting the database find rows quickly.

What to learn

NormalisationRelationshipsIndexesEXPLAINViews

A good index can turn a slow query into an instant one. Learn to read query plans with EXPLAIN.

Example

sql

CREATE INDEX idx_orders_customer ON orders (customer_id);
EXPLAIN ANALYZE
SELECT * FROM orders WHERE customer_id = 42;

Add an index and check how the database now runs the query.

Practice project: Add indexes to your shop database and compare query times before and after.

Helpful resource: Use The Index, Luke

8Step 8: SQL in practice and job preparation

Use SQL with other tools and prepare for SQL interviews.

What is it?

In real jobs, SQL is often run from Python, Excel or BI tools like Power BI. Interviews usually test joins, grouping and window functions.

What to learn

SQL in PythonSQL in BI toolsCommon interview questionsPortfolio queries

SQL is used across backend, data and analytics jobs. Our data analyst roadmap shows one popular path.

Example

python

import pandas as pd
import sqlalchemy
engine = sqlalchemy.create_engine("postgresql://user:pass@localhost/shop")
df = pd.read_sql("SELECT * FROM sales", engine)

Run a SQL query from Python and load the result into a Pandas table.

Practice project: Publish a GitHub repo of business questions and the SQL that answers each one.

Helpful resource: Read data career tips in our latest articles.

SQL roadmap project ideas

Projects turn what you learn into real skills. Build at least one project from each level below, and put every finished project on GitHub with a clear README.

Beginner

Shop database

Design tables for customers, products and orders.

Beginner

Business questions

Answer 15 practical questions with SELECT and GROUP BY.

Intermediate

Sales report

Monthly revenue, top products and repeat customers.

Intermediate

HR analytics

Headcount, turnover and salaries by department with joins.

Advanced

Customer ranking

Window functions for ranks, running totals and cohorts.

Advanced

Performance tuning

Index a large table and document the speed gains.

Tips to finish this sql roadmap

  • Learn by building. Spend at least two thirds of your study time writing code and making projects, not watching videos.
  • Be consistent. One focused hour every day beats a long session once a week. Small daily progress adds up quickly.
  • Share your work. Post your projects on GitHub and LinkedIn. It builds your confidence and helps recruiters find you.
  • Ask for feedback. Join a community, ask questions and review other people’s code. Explaining things to others is one of the fastest ways to learn.
  • Do not chase every new tool. The fundamentals in this sql roadmap change slowly. Master them first, then explore new libraries.

Career paths and next steps

After this SQL roadmap, SQL will support roles such as data analyst, backend developer, BI analyst and data engineer.

Continue with the data analyst roadmap or the data scientist roadmap.

Related roadmaps

SQL Roadmap FAQs

How long does it take to learn SQL?

You can learn the basics in a few weeks. Becoming confident with advanced queries usually takes 2 to 4 months.

Is SQL a programming language?

SQL is a query language designed for working with data in databases. It is simpler than general programming languages but very powerful.

Which SQL database should I learn?

PostgreSQL and MySQL are both free and popular. The core SQL you learn works in almost every database.

Can I get a job with only SQL?

SQL alone is rarely enough, but combined with Excel, a BI tool or Python, it can lead to data analyst roles.