PopularJourney
Learn SQL
A free, interactive online SQL course. You run 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.
134,690+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseLearn how to create databases, define tables, and perform simple queries.Introduction
4 lessons423- 01IntroductionChallenge
- 02What is a databaseChallengeQuiz
- 03Database conceptsChallengeQuiz
- 04Unique valuesChallengeQuiz
Conditions
7 lessons1256- 01Conditions BasicsChallengeQuiz
- 02The AND keywordChallengeMasteryQuiz
- 03The OR keywordChallengeMasteryQuiz
- 04The NOT keywordChallengeMasteryQuiz
- 05Multiple Conditions CombinedChallengeQuiz
- 06ParenthesisChallengeMasteryQuiz
- 07BooleansChallengeMasteryQuiz
Specific Return Format
6 lessons630- 01Null valuesChallengeQuiz
- 02Sort Results Part 1ChallengeQuiz
- 03Sort Results Part 2ChallengeQuiz
- 04Recap - Cyber Security FirmChallenge
- 05Limit number of recordsChallengeQuiz
- 06Recap - Vehicle FactoryChallenge
More Keywords
5 lessons532- 01The IN keywordChallengeQuiz
- 02The BETWEEN keywordChallengeQuiz
- 03The LIKE keywordChallengeQuiz
- 04The AS keywordChallengeQuiz
- 05Recap - Cellphone ModelsChallenge
Arithmetic Operations
4 lessons332- 01Mathematical OperatorsChallengeQuiz
- 02Mathematical ColumnsChallengeQuiz
- 03The Modulo OperationChallengeQuiz
- 04The ROUND() FunctionQuiz
Intro Challenges
4 lessons4- 01Recap - Parliamentary ElectionChallenge
- 02Recap - Police Criminal ArrestChallenge
- 03Recap - Bar Beverage ContainerChallenge
- 04Recap - Engineer new columnsChallenge
Dates
3 lessons325- 01Handling Dates Part 1ChallengeQuiz
- 02Handling Dates Part 2ChallengeQuiz
- 03Handling Dates Part 3ChallengeQuiz
Statistics
9 lessons950- 01Built-In Aggregate Part 1ChallengeQuiz
- 02Built-In Aggregate Part 2ChallengeQuiz
- 03Grouping Part 1ChallengeQuiz
- 04Grouping Part 2ChallengeQuiz
- 05Subqueries Part 1ChallengeQuiz
- 06Subqueries Part 2ChallengeQuiz
- 07Recap - Total Gain ShopChallenge
- 08Recap - Scooter ShopChallenge
- 09Recap - Coffee ShopChallenge
Multiple tables
9 lessons944- 01Basic Join Part 1ChallengeQuiz
- 02Basic Join Part 2ChallengeQuiz
- 03Recap - JoinChallenge
- 04Self joinChallengeQuiz
- 05Recap - Self JoinChallenge
- 06UnionChallengeQuiz
- 07Simplify queries, WITH keywordChallengeQuiz
- 08Recap - With QueriesChallenge
- 09Recap - Real Estate ContractorChallenge
Imaginary Products
Project5 lessons1- 01Adjust WattChallenge
- 02Calculate Product QualityProject
- 03Expand To Other ProductsProject
- 04Combine All ProductsProject
- 05The Overall AverageProject
Window Functions part 1
8 lessons836- 01ROW_NUMBER functionChallengeQuiz
- 02ORDER BY criterionChallengeQuiz
- 03PARTITION BY criterionChallengeQuiz
- 04PARTITION & ORDERChallengeQuiz
- 05LEAD & LAG FunctionsChallengeQuiz
- 06Recap - LEAD & LAGChallenge
- 07Recap - PicturesChallenge
- 08Recap - BoxesChallenge
Window Functions part 2
5 lessons532- 01RANK & DENSE_RANK FunctionsChallengeQuiz
- 02Recap - RANK & DENSE_RANKChallenge
- 03NTILE FunctionChallengeQuiz
- 04Aggregation FunctionsChallengeQuiz
- 05ROWS & RANGE CriterionChallengeQuiz
Summary
3 lessons3- 01Recap - CreaturesChallenge
- 02Recap - BooksChallenge
- 03Recap - JunkChallenge
Section 2
Beyond the Basics
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 lessons532- 01CASE WHENChallengeQuiz
- 02CASE in ORDER BYChallengeQuiz
- 03COALESCE for NULLsChallengeQuiz
- 04NULLIF and IIFChallengeQuiz
- 05Recap - AttendanceChallenge
String Functions
6 lessons640- 01LENGTH, UPPER, LOWERChallengeQuiz
- 02SUBSTRChallengeQuiz
- 03INSTRChallengeQuiz
- 04REPLACE and TRIMChallengeQuiz
- 05Concatenating with ||ChallengeQuiz
- 06Recap - InvoicesChallenge
Conditional Aggregation
4 lessons424- 01COUNT with CASEChallengeQuiz
- 02SUM with CASEChallengeQuiz
- 03Pivoting Rows to ColumnsChallengeQuiz
- 04Recap - Traffic SourcesChallenge
Set Operations
4 lessons423- 01UNION vs UNION ALLChallengeQuiz
- 02INTERSECTChallengeQuiz
- 03EXCEPTChallengeQuiz
- 04Recap - MembershipChallenge
Recursive CTEs
3 lessons316- 01A Number SequenceChallengeQuiz
- 02Walking a HierarchyChallengeQuiz
- 03Recap - Org ChartChallenge
Analytics Recipes
5 lessons532- 01Top-N per GroupChallengeQuiz
- 02Percentage of TotalChallengeQuiz
- 03Running TotalChallengeQuiz
- 04Keeping One Row per KeyChallengeQuiz
- 05Recap - Top CustomersChallenge
SQL courses
Hands-on SQL courses, free to start in your browser.
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, andGROUP BYqueries, 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.
- AI hints walk you through query mistakes - wrong joins, missing
GROUP BYcolumns, 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.