SQL From Scratch
Start learningLearn SQL from scratch
SELECT to window functions, built up step by step, no hand-waving.
You keep meaning to learn SQL and a tutorial keeps stalling at JOINs. Build SELECT through window functions step by step, so you finally write queries instead of asking for them.
Overview
SQL is the most leverage-per-hour skill in tech, and the most badly taught. Most tutorials drop you in the deep end with a 5-table join on day one. This one builds you up properly: one mental model at a time, with the kind of small drills that make queries feel obvious instead of magical. By the end, window functions and CTEs feel as natural as a for-loop.
What you'll learn
By the end, you'll be able to do these, not just have read about them.
Move from SELECT through joins, subqueries, and window functions
Read query results with the rigor that catches mistakes
Apply SQL idioms across MySQL, Postgres, and warehouses
Build the muscle memory that makes SQL second nature
Who this is for
You're a PM, marketer, or analyst who keeps asking the data team for the same numbers.
You're a self-taught dev who can query but freezes on anything beyond a JOIN.
You want to read your own dashboards and stop saying 'let me check with data'.
Prerequisites
No SQL or programming experience required.
A laptop and curiosity.
Suggested chapters
This is the typical chapter list. Your version is generated against your background and adapts as you go. It may compress, expand, or reorder these.
- 01
How databases think
Tables, rows, types, the mental model you need before the syntax.
- 02
SELECT, WHERE, ORDER BY
The 80% of queries you'll ever write, done deliberately.
- 03
Aggregations & GROUP BY
COUNT, SUM, AVG, and the gotcha that makes most beginners trip up.
- 04
Joins, properly
INNER, LEFT, multi-join, drawn out so they stop being scary.
- 05
Subqueries & CTEs
Reading nested logic. Writing readable queries. WITH clauses as your friend.
- 06
Window functions
Running totals, rank, lead/lag, the unlock that separates analyst from intern.
- 07
Real analyst workflows
Cohorts, funnels, retention curves, translating product questions into SQL.
Real-world projects
- 01Answer 30 real product questions against a sample e-commerce dataset.
- 02Build a 3-step retention cohort using window functions.
- 03Convert one of your team's standing data requests into a self-service query.
Tools & concepts
Real tools and ideas covered. Octo brings them in when they fit your stack.
- SELECT
- WHERE
- ORDER BY
- GROUP BY
- JOIN (INNER/LEFT/RIGHT)
- Subqueries
- CTEs
- Window functions
- CASE WHEN
- Aggregations
- PostgreSQL
Where this leads
- 01
Analyst-grade fluency, read your own dashboards, write your own queries.
- 02
Foundation for SQL for Data Analysis and Advanced SQL.
- 03
A meaningful productivity unlock for any product, marketing, or ops role.
Common questions
Which SQL dialect does this teach?
PostgreSQL syntax, with notes on how MySQL / BigQuery / Snowflake differ. The fundamentals translate directly.
Do I need to install anything?
Octo gives you a sandbox. You can also follow along with any free Postgres install, both work.
Is this a fixed course, or is it built for me?
Built for you. The chapter list below is a typical outline. Your actual course is generated against your role, experience, and what you already know, then adapts as you go.
How long does it take?
Most learners finish in 2–6 weeks at a normal pace, depending on the topic. Octo compresses where you're strong and slows down where you're weak.
Is there a fixed schedule or cohort?
No. You start when you start. There's no live session, no calendar, no deadline.
Can I ask questions while I'm learning?
Yes, every module has an AI Sidekick in the margin. Ask for a different example, push back, or get a clarifying analogy without leaving the page.
What do I get at the end?
A verifiable, HMAC-signed certificate with a public verify page. It records the modules passed, scores, and capstone, not just attendance.
How much does it cost?
Octo is in research preview, courses are open. We'll be transparent before pricing changes.
More in SQL
- Advanced SQLYou can write a join in your sleep and complex queries still humble you. Master window functions, CTEs, recursion, and optimization, so you handle the queries other people give up on.View course
- SQL for Data AnalysisYou know SQL syntax and analyst SQL is a different sport. Learn to do real cohort, funnel, and time-on-anything work in SQL, so you move from queries to analyses.View course
- SQL Interview PrepThe interviewer wants you to write SQL on a shared screen and think out loud. Learn the 80% of questions that get asked and the reasoning patterns, so you stop freezing on round one.View course