Menu
CoddyTech
PopularJourney

Learn SQL

A free, interactive online SQL course. You practice with real SQL queries against live tables on every lesson, with AI hints when a query doesn't return what you expect, and a free certificate when you finish.

152,429+ codders enrolled4.8 stars on the App Store

99 lessons98 challenges527 quiz questionsAbout 9 hours

  • Beginner friendly
  • sparkles iconAI-assisted coding help
  • hint iconHands-on interactive lessons
  • volume On iconAudio narration on every lesson
  • quiz iconQuizzes to test your knowledge
  • certificate iconFree certificate of completion

Syllabus

2 sections1 projects99 lessons98 challenges527 quiz questions
  1. Start sectionStartExpandCollapseLearn how to create databases, define tables, and perform simple queries.

    Introduction

    4 lessons423

    Conditions

    7 lessons1256

    Specific Return Format

    6 lessons630

    More Keywords

    5 lessons532

    Arithmetic Operations

    4 lessons332

    Dates

    3 lessons325

    Statistics

    9 lessons950

    Multiple tables

    9 lessons944

    Imaginary Products

    Project5 lessons5

    Window Functions part 1

    8 lessons836

    Window Functions part 2

    5 lessons532

    Summary

    3 lessons3
  2. Start sectionStartExpandCollapsePractical SQL on top of the fundamentals: conditional logic, string functions, pivoting with conditional aggregation, set operations, recursive CTEs, modifying data, and analytics recipes.

    Conditional Logic

    5 lessons632

    String Functions

    6 lessons640

    Conditional Aggregation

    4 lessons424

    Set Operations

    4 lessons423

    Recursive CTEs

    3 lessons316

    Analytics Recipes

    5 lessons532

SQL courses

Hands-on SQL courses, free to start in your browser.

What you get
Everything you'll use to learn to code

Run Real SQL Queries

Run real SQL queries against a live database in every lesson, from SELECT and JOIN to window functions.

query.sql
SQL
1SELECT name, score
2FROM students
3WHERE score > 80
4ORDER BY score DESC;
Input
namescore
Alice95
Bob72
Charlie88
Output
namescore
Alice95
Charlie88
Expected
namescore
Alice95
Charlie88

Build Your Streak

Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.

12 days streak

Return tomorrow to keep your streak!

fire Filled icon
left icon

January 2026

right icon

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

21

22

23

24

25

26

27

28

29

30

product Double Or Nothing icon

Double or Nothing

Day 5 of 7

fire Freeze icon

Streak Freeze

2 left

Code Anywhere

Take your coding journey on the go! No setup, no downloads: just open and start coding. Available on iOS, Android and Web with 4.8 star ratings.

Python
7Streak
250Score
5Energy
Variables
journey Hex Done Base iconjourney Hex Done Shadow iconjourney Hex Done Top iconjourney Lesson Done icon
journey Path Right Done icon
journey Hex Done Base iconjourney Hex Done Shadow iconjourney Hex Done Top iconjourney Lesson Done icon
journey Path Left Done icon
journey Hex Active Base iconjourney Hex Active Shadow iconjourney Hex Active Top iconjourney Lesson Theory Challenge icon
Continue
journey Path Right icon
journey Hex Locked Base iconjourney Hex Locked Shadow iconjourney Hex Locked Top iconjourney Lesson Theory Challenge icon
journey Path Left icon
journey Hex Locked Base iconjourney Hex Locked Shadow iconjourney Hex Locked Top iconjourney Lesson All icon
Journey
Goals
Leaderboard
Profile
4.8
StarStarStarStarStar
Rating

You're Not Alone

Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!

Challenger League
Challenger LeagueTop 7 advance
leaderboard First icon1
avatar 1 icon
fire Filled icon
Alex7+ Days
2840
leaderboard Second icon2
avatar 2 icon
fire Filled icon
Jordan7+ Days
2650
leaderboard Third icon3
avatar 3 icon
fire Filled icon
Sam7+ Days
2420
4
avatar 4 icon
Casey
2180
5
avatar placeholder icon
fire Filled icon
Morgan7+ Days
1950
leaderboard Arrow Up iconPromotion zoneleaderboard Arrow Up icon

Every way to learn

Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.

Intro to Variables
Audio

A variable is a named container that stores a value you can reference later in your program.

In Python, you create one by writing the name, an equals sign, then the value you want to store.

The value can change over time. Reassigning the name simply points it to a new value.

1xSarah

Earn a Certificate

Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.

CoddyCertificate of Completion
This certifies thatJohn Doehas successfully completed
python iconPython Fundamentals
Verified
DateJan 2026
LinkedInAdd to LinkedIn

Why learn SQL with Coddy

  • Run real SQL online. Every lesson runs against a live SQLite database in your browser, so you write actual SELECT, JOIN, and GROUP BY queries, not pseudo-code.
  • SQL basics through advanced patterns in one course: filtering, sorting, multi-table joins, aggregations, subqueries, window functions. The SQL you actually need at work. It also covers SQL for data analysis, with Analytics Recipes lessons on top-N per group, percentage of total and running totals.
  • AI hints walk you through query mistakes - wrong joins, missing GROUP BY columns, off-by-one filters - without just handing you the answer.
  • Free SQL certificate when you finish, plus the option to keep practicing with quizzes and projects so the SQL skills don't fade after the course.

Frequently asked questions about learning SQL

Is SQL hard to learn?

SQL is one of the easier languages to pick up because it's declarative - you describe what you want, not how to compute it. The basics (SELECT, WHERE, ORDER BY) take a few hours. Joins, subqueries, and window functions are where most of the depth lives, and the course introduces them in small, queryable steps.

How long does it take to learn SQL?

You can learn SQL basics in a week of daily practice. Comfortable use of joins, aggregations, and subqueries usually takes two to four weeks. Reaching expert level - query optimization, window functions, CTEs - takes longer and is mostly driven by working on real data.

Where can I practice SQL online for free?

Coddy is a free SQL learning platform. Every lesson includes an in-browser SQL editor with real seed tables, so you write and run SQL queries against actual data without setting up a database locally.

Do I need to install a database to learn SQL here?

No. Every SQL exercise runs in your browser against a sandboxed SQLite database with realistic seed tables. You don't need to install Postgres, MySQL, or any other database engine to learn SQL.

Which SQL dialect does this course teach?

The course is dialect-agnostic for the fundamentals and uses SQLite under the hood. Standard SQL - SELECT, joins, aggregations, subqueries, CASE, GROUP BY - works the same in Postgres, MySQL, SQL Server, and Snowflake. Dialect-specific features are called out where relevant.

Do I get a certificate after the SQL course?

Yes. Finishing the SQL course gives you a free certificate of completion you can add to your resume or share on LinkedIn - useful for analyst, data engineer, and back-end roles where SQL is a baseline expectation.

Learning paths with SQL

SQL is part of the DevOps, Backend Developer, Software Engineer, Data Analyst, Full Stack Developer, and Data Scientist paths. Each path is several courses in the order a mentor would teach them, each with its own free certificate.

Coddy programming languages illustration

Learn SQL with Coddy

Get started