All roadmaps

SQL

The 50-year-old skill every data job still screens for.

SQL in depth: querying and filtering, joins, aggregation, subqueries and CTEs, window functions, schema design, indexes and data modification - with practice resources on every topic.

Your progress0/43 topics · 0%

Progress is saved in this browser.

7 stages43 topics₹0 to follow

Filled nodes are the focus for this track; outlined ones can wait. Tap a topic to open it and mark it done, learning or skipped.

SQL in 2026Related roadmapsData Analyst roadmapBackend roadmapPython roadmapProve it as you goReading is half of it. This roadmap isbacked by a free, scored SQLcertification with a public verificationlink and a Data Analyst job simulation onreal tickets - evidence a recruiter cancheck, not a claim. Mark topics done,learning or skipped as you go; yourprogress carries into the classic view.Get certified - freeJob simulationClassic viewKnow the demand before thesyntaxSQL in 2026What to learn in 2026Joins, windows,CTEsModelling andtuningAI writes SQL; you checkWhich roles use itAnalyst andengineerEvery data roleFresher vs switcherWhat companies expectThe hiring barWhat interviewstestProof they verifyWhat gets you hiredA 90-day planProjects thatget readCertification and proofRead any table with precision.Query FoundationsSELECT & WHERESorting & paginationExpressions & functionsWorking with datesCombine tables and predict therow count.JoinsINNER & LEFT joinsAnti-joins & semi-joinsSelf-joinsSet operationsTurn transactions into metrics.AggregationGROUP BY & HAVINGConditional aggregationGROUPING SETS & ROLLUP(awareness)The SQL that marks you asexperienced.Subqueries, CTEs & WindowsSubqueriesCTEsWindow functionsDedup & top-N per groupUnderstand any database you'redropped into.Schema & PerformanceTables, keys & constraintsNormalisation (practical)Indexes & EXPLAININSERT, UPDATE, DELETE &transactionsVerified SQL on the resume.Prove ItCertificationFresher or experienced?Both tracks hold every topic. On the Fresher track thefoundations are filled and the later stages are outlined - dothem when a project needs them. On the Experienced track thefoundations are outlined and the later stages are filled. The2026 section at the top applies to both.Prefer a list?The classic view shows the same 6 stages as a sequentialchecklist with time estimates. Your marks are shared betweenthe two views.Open the classic view

Everything on this roadmap

Every stage and topic on the map, in reading order. Click any topic to open it.

The SQL roadmap, topic by topic

Every topic on the map in reading order, with what to learn and the resources we recommend. Main topics are open; open any subtopic to read it. Select a topic name to open it in the topic panel, where you can track your progress.

  1. 1. Know the demand before the syntax

    SQL in 2026

    2026

    SQL is the one language every data job, most backend jobs and a growing share of product and finance jobs share, and it has not been displaced by AI - it has been made more important, because the models write it and someone has to know whether it is right. The Stack Overflow 2025 survey puts SQL at 59 percent of developers and PostgreSQL first among databases at 58 percent. The four nodes answer what to learn in SQL in 2026, which roles use it, what companies expect and what gets you hired.

    What to learn in 2026

    Learn querying to the level interviews are decided at - joins, aggregation, window functions, common table expressions, subqueries and correct handling of nulls and duplicates - then modelling and performance, schemas, keys, indexes and reading a query plan, and then the 2026 skill: checking SQL that an assistant wrote. The sub-nodes order the three.

    Joins, windows, CTEs

    Joins and the grain of a result, aggregation and grouping, window functions for running totals, rankings and comparisons across rows, common table expressions for readable multi-step logic, subqueries, set operations, and the null and duplicate traps that make a correct-looking query wrong. The Stack Overflow 2025 survey has SQL at 59 percent of developers, and the analyst and backend interviews that decide offers are decided here - almost always on a window function or a join that fans out. Practise on realistic schemas with messy data until the first query you write is the right one.

    Modelling and tuning

    Beyond querying sits the engineer's half: designing a schema with keys and constraints, normalising and deliberately denormalising, migrations, indexes and why a query is slow, reading an execution plan, transactions and isolation, and the modelling patterns warehouses use. PostgreSQL is the most used database in the Stack Overflow 2025 survey at 58 percent, so learn these on Postgres. Backend developers are tested on indexes and plans; data engineers on models and pipelines; both on the question of what happens when the table has a hundred million rows.

    AI writes SQL; you check

    AI

    Assistants write SQL fluently now - and confidently wrong: a join that doubles rows, an aggregate at the wrong grain, a filter that drops the nulls you needed, a window with the wrong partition. The Microsoft and LinkedIn Work Trend Index found 75 percent of knowledge workers using AI at work; Indeed's Hiring Lab reported about 45 percent of data postings mentioning AI by January 2026. The skill employers now pay for is reading generated SQL faster than it was written: state the grain, check the row counts, reconcile a total against a source of truth, and only then trust the number. The Data Analyst roadmap's AI nodes go deeper.

    Which roles use it

    Analysts, data engineers and backend developers write SQL every day; data scientists, product managers, finance teams and founders write it often enough that it is listed in their job descriptions. The sub-nodes name the roles, say why every data role needs it, and lay out the fresher and switcher routes.

    Analyst and engineer

    Data analysts live in SQL; data engineers build the pipelines and models that make SQL answerable; backend developers write it behind every API. The Stack Overflow 2025 survey's 59 percent share for SQL spans all three. Analyst roles test querying and reconciliation, engineering roles test modelling and performance, and both are large in India's fintech, e-commerce, SaaS and global capability centre hiring. The Data Analyst and Backend roadmaps are the two paths this skill feeds.

    Every data role

    Every data role needs SQL because the data is in a database: data scientists pull their training sets with it, product managers check funnels with it, finance teams reconcile with it, founders read their own metrics with it. The World Economic Forum's Future of Jobs 2025 report has seven in ten employers ranking analytical thinking the core skill, and SQL is the most common way that thinking touches data. For someone who is not becoming an analyst, two weeks of SQL is the highest-return technical skill available.

    Fresher vs switcher

    A fresher should be able to solve window-function questions cold and show one reconciled analysis on real data; HackerRank's 2025 report found early-career hiring the hardest hit and 74 percent of developers struggling to land a job, so demonstrated correctness is the lever. A switcher from Excel, finance or operations already understands the data and should spend the time on joins, grain and windows. On this map freshers get the basics filled and the performance stages outlined; experienced learners get the reverse.

    What companies expect

    Companies expect correct SQL under time pressure on realistic schemas: the right join, the right grain, window functions where they belong, and a reconciliation habit that catches a wrong number before it reaches a decision. The sub-nodes cover the bar, the interview and what gets verified.

    The hiring bar

    The bar is correct queries on realistic data, fast: the right join without fan-out, the right grain, window functions used where they belong, readable CTEs, and a reconciliation step before a number leaves your hands. The Work Trend Index found 66 percent of leaders unwilling to hire without AI skills; for SQL that means using an assistant to draft and being the person who catches the doubled rows. A candidate who checks a count against a known total without being asked is at the bar.

    What interviews test

    Expect live SQL on a given schema - typically three to five questions rising to a window function or a self-join - sometimes with an assistant allowed, plus questions on indexes and plans for backend roles and on grain and reconciliation for analyst roles. HackerRank's 2025 report says 66 percent of developers prefer practical assessments and that they are now the standard. Explaining why a join fans out, and how you would catch it, is worth more than a clever query.

    Proof they verify

    Reviewers run your queries. A repository with a schema, seed data, the questions asked and the reconciled answers beats a list of courses; a deployed dashboard whose numbers tie to a source beats screenshots; OneRoadmap's free SQL certification with its public verification link beats a badge. A short note on which queries an assistant drafted and how you verified them is now part of the proof.

    What gets you hired

    A project whose queries a reviewer can run, a repository with a schema and reconciled results, a verified certification and a clear account of which queries an assistant drafted and how you checked them. The sub-nodes give the ninety-day plan, the projects that get read and the proof that counts.

    A 90-day plan

    Month one: querying from joins to windows on a public dataset in Postgres, with daily practice problems. Month two: modelling and performance - design a schema, load real data, index it, read plans - and one reconciled analysis with a written memo. Month three: a deployed dashboard or notebook whose numbers tie to a source, a readme on the decisions and the assistant-drafted queries you checked, the SQL certification, and twenty targeted applications a week.

    Projects that get read

    Projects that get read answer a question and show the checks: a cohort retention analysis with window functions and a reconciled headline; a schema and query set for a realistic business with indexes and plans explained; a data-quality audit that quantifies duplicates and nulls and their effect on a metric; a pipeline that loads, models and tests a public dataset. Each has a repository and a readme. The World Economic Forum's 2025 report lists big data specialists among the fastest-growing roles; correct SQL is the entry ticket to that growth.

    Certification and proof

    Proof is verifiable: OneRoadmap's free SQL certification with a public link, a GitHub profile with real queries and schemas, a deployed analysis and a short account of your assistant workflow. The candidates who get replies are the ones whose numbers a reviewer can reproduce.

  2. 2. Read any table with precision.

    Query Foundations

    Read any table with precision.

    Time: about 1-2 weeks. Topics: SELECT & WHERE · Sorting & pagination · Expressions & functions · Working with dates.

    SELECT & WHERE

    Optional on the Experienced track

    Projection, filtering, DISTINCT and LIMIT - with NULL three-valued logic that doesn't surprise you.

    Sorting & pagination

    Optional on the Experienced track

    ORDER BY with ties, OFFSET pitfalls and keyset pagination at concept level.

    Expressions & functions

    Optional on the Experienced track

    String, date and math functions plus CASE - computing answers inside the query.

    Working with dates

    Optional on the Experienced track

    Truncation, intervals and time zones - where analytics queries most often go quietly wrong.

  3. 3. Combine tables and predict the row count.

    Joins

    Combine tables and predict the row count.

    Time: about 1-2 weeks. Topics: INNER & LEFT joins · Anti-joins & semi-joins · Self-joins · Set operations.

    INNER & LEFT joins

    Matching logic, join keys and preserved sides - most interview SQL is join reasoning in disguise.

    Anti-joins & semi-joins

    'Customers with no orders': NOT EXISTS / LEFT JOIN … IS NULL patterns you'll use weekly.

    Self-joins

    Joining a table to itself for hierarchies and comparisons within a group.

    Set operations

    UNION vs UNION ALL, INTERSECT and EXCEPT - stacking result sets cleanly.

  4. 4. Turn transactions into metrics.

    Aggregation

    Turn transactions into metrics.

    Time: about 1-2 weeks. Topics: GROUP BY & HAVING · Conditional aggregation · GROUPING SETS & ROLLUP (awareness).

    GROUP BY & HAVING

    Grouping rules, aggregate functions and post-aggregation filtering - the metrics engine of SQL.

    Conditional aggregation

    COUNT(CASE WHEN …) pivot patterns - many 'need a BI tool' requests are one query.

    GROUPING SETS & ROLLUP (awareness)

    Subtotals and multiple groupings in a single pass.

  5. 5. The SQL that marks you as experienced.

    Subqueries, CTEs & Windows

    The SQL that marks you as experienced.

    Time: about 2 weeks. Topics: Subqueries · CTEs · Window functions · Dedup & top-N per group.

    Subqueries

    Scalar, IN/EXISTS and correlated subqueries - and when each beats a join.

    CTEs

    WITH clauses for readable multi-step logic; recursive CTEs for hierarchies at concept level.

    Window functions

    ROW_NUMBER/RANK, PARTITION BY, running totals and moving averages - the top screening differentiator.

    Dedup & top-N per group

    The canonical window-function interview problems, solved and internalised.

  6. 6. Understand any database you're dropped into.

    Schema & Performance

    Understand any database you're dropped into.

    Time: about 1-2 weeks. Topics: Tables, keys & constraints · Normalisation (practical) · Indexes & EXPLAIN · INSERT, UPDATE, DELETE & transactions.

    Build: Ten questions, one dataset. Load a public dataset into Postgres/SQLite and answer ten business questions; publish the queries with comments.

    Tables, keys & constraints

    Primary/foreign keys, UNIQUE, NOT NULL and CHECK - integrity enforced where data lives.

    Normalisation (practical)

    Avoiding duplication and update anomalies - and when analytics schemas denormalise on purpose.

    Indexes & EXPLAIN

    Why one query is instant and another isn't - reading a query plan at survival level.

    INSERT, UPDATE, DELETE & transactions

    Modifying data safely: affected-row checks, RETURNING and BEGIN/COMMIT discipline.

  7. 7. Verified SQL on the resume.

    Prove It

    Verified SQL on the resume.

    Time: about 1 week. Topics: Certification.

    Certification

    Take the OneRoadmap SQL certification - verified, recruiter-checkable proof.

Prove it as you go

Reading is half of it. This roadmap is backed by a free, scored SQL certification with a public verification link and a Data Analyst job simulation on real tickets - evidence a recruiter can check, not a claim. Mark topics done, learning or skipped as you go; your progress carries into the classic view.

Fresher or experienced?

Both tracks hold every topic. On the Fresher track the foundations are filled and the later stages are outlined - do them when a project needs them. On the Experienced track the foundations are outlined and the later stages are filled. The 2026 section at the top applies to both.

Prefer a list?

The classic view shows the same 6 stages as a sequential checklist with time estimates. Your marks are shared between the two views.

Frequently asked questions

Is SQL still worth learning when AI writes queries?

More than before. Assistants write SQL fluently and confidently wrong - a join that doubles rows, an aggregate at the wrong grain, a filter that drops the nulls you needed. The person who can state the grain, check the row counts and reconcile a total is the one whose numbers get trusted. The Stack Overflow 2025 survey has SQL at 59 percent of developers.

Which database should I learn on?

PostgreSQL, which the Stack Overflow 2025 survey ranks the most used database. The SQL you learn transfers to MySQL, SQL Server, BigQuery and Snowflake with small dialect differences, and Postgres is free, runs anywhere and is what most new products and AI builders use.

How much SQL do I need for a data analyst job?

Joins without fan-out, aggregation at the right grain, window functions for rankings and running totals, common table expressions, subqueries and the null and duplicate traps. Interviews are almost always decided on a window function or a join that fans out. Modelling and performance are the engineer's half; analysts need to read a plan, not tune one.

Do backend developers need SQL?

Yes, deeply: schema design, keys and constraints, migrations, indexes and why a query is slow, transactions and isolation. Backend interviews test indexes and plans; the ORM hides the query until it is the thing that is slow. Learn SQL on Postgres before learning any ORM.

SQL or Python first?

SQL, for almost everyone in data: two weeks of SQL is the highest-return technical skill for an analyst, a product manager, a finance team or a founder, because the data is in a database. Python comes next for analysis beyond what SQL does well. For a backend developer, the language first and SQL immediately after.

How long does it take to learn SQL?

The basics take days; interview-level fluency with joins, grain and window functions takes a few weeks of daily practice on realistic schemas; modelling and performance take longer. Nobody can promise a timeline. The evidence is an analysis whose numbers tie to a source and queries a reviewer can run.

Will AI replace SQL skills?

AI replaced the typing, not the checking. Indeed's Hiring Lab found about 45 percent of data postings mentioning AI by January 2026, and those roles still test SQL live, because someone has to know whether the generated query is right. Reading generated SQL faster than it was written is the 2026 version of the skill.

How do I prove SQL skills without job experience?

A repository with a schema, seed data, the questions asked and the reconciled answers; a deployed dashboard whose numbers tie to a source; a data-quality audit that quantifies duplicates and nulls; and OneRoadmap's free SQL certification with its public verification link. Add a note on which queries an assistant drafted and how you verified them.