Learn SQL Online
Learn SQL online through a structured sequence instead of collecting unrelated tutorials. SQL Arena courses combine short theory with a browser-based task in every lesson, and the first chapters are available free.
Updated · SQL Arena team
What you will practice
- SQL fundamentals from zero
- Practice after each lesson
- Multiple SQL dialects
- Query performance analysis
- Analytics and data engineering topics
A practice problem in the trainer
This is how a problem looks in SQL Arena: the task, the editor, the result and the database schema.
Use the courses and lessons tables. Return only free lessons that belong to active courses. Show the course title as course, lesson title as free_lesson, and course level as level. Sort by course title and then lesson id.
SELECT c.title AS course, l.title AS free_lesson, c.level FROM courses c JOIN lessons l ON l.course_id = c.id WHERE c.is_active = TRUE AND l.is_free = TRUE ORDER BY c.title, l.id;
| # | course | free_lesson | level |
|---|---|---|---|
| 1 | BigQuery Foundations | Arrays | intermediate |
| 2 | JSON in SQL | JSON Values | intermediate |
| 3 | Query Performance | Reading EXPLAIN | advanced |
| 4 | SQL Basics | First SELECT | beginner |
Use the courses and lessons tables. Return only free lessons that belong to active courses. Show the course title as course, lesson title as free_lesson, and course level as level. Sort by course title and then lesson id.
SELECT c.title AS course, l.title AS free_lesson, c.level FROM courses c JOIN lessons l ON l.course_id = c.id WHERE c.is_active = TRUE AND l.is_free = TRUE ORDER BY c.title, l.id;
How this query works
The courses table stores one row per course, while lessons stores individual lessons. lessons.course_id points to courses.id, so JOIN connects each lesson to its parent course. After the join, a row contains information from both sides of that relationship.
The WHERE clause applies two requirements. c.is_active = TRUE removes an archived course, while l.is_free = TRUE keeps only lessons available in the free part. The SELECT list uses readable aliases because course and free_lesson describe the result better than repeating the source column names.
ORDER BY c.title, l.id makes the output deterministic. Courses are sorted alphabetically and lessons within the same course follow their ids. This is a small example, but it demonstrates the workflow you need throughout a SQL course: understand the tables, identify the relationship, apply the task conditions, and verify the result.
SELECT c.title AS course, l.title AS free_lesson, c.level FROM courses c JOIN lessons l ON l.course_id = c.id WHERE c.is_active = TRUE AND l.is_free = TRUE ORDER BY c.title, l.id;
| course | free_lesson | level |
|---|---|---|
| BigQuery Foundations | Arrays | intermediate |
| JSON in SQL | JSON Values | intermediate |
| Query Performance | Reading EXPLAIN | advanced |
| SQL Basics | First SELECT | beginner |
| SQL Basics | Filtering Rows | beginner |
Common mistakes when learning SQL
Watching lessons without writing queries
Syntax can look familiar after a video or article, but recognition is different from recall. A useful SQL course should regularly make you write the query yourself.
Starting with an advanced specialization
Performance tuning, ClickHouse, BigQuery, and data engineering become much easier after basic filtering, joins, and aggregation are comfortable. Otherwise you are learning SQL fundamentals and platform-specific behavior at the same time.
Following a course without extra practice
A course gives you sequence and explanation, but additional exercises help turn concepts into reusable skills. Mix guided lessons with independent problems where the required SQL construct is not given away.
10 SQL Arena courses
All coursesSQL Arena currently includes 10 courses. SQL Basics has 12 chapters and 77 lessons, with 16 free lessons. Data Analysis with Python and pandas in the browser has 13 chapters and 83 lessons, including 11 free lessons. SQL Performance has 10 chapters and 49 lessons, including EXPLAIN ANALYZE and index work on a 10-million-row database; 6 lessons are free. The ClickHouse course has 8 chapters and 41 lessons, with 5 free. BigQuery has 8 chapters, 27 lessons, and 4 free lessons. Regular Expressions in SQL and JSON and Nested Data each have 6 chapters and 18 lessons, with 3 free lessons each. NoSQL in Practice covers Redis, MongoDB, and Cassandra in 9 chapters and 41 lessons, with 4 free. Data Engineering has 10 chapters and 58 lessons, with 6 free, while Kafka has 10 chapters and 59 lessons, with 7 free. Every lesson combines theory with a task in the browser.
- SQL from scratch12 chapters · 77 lessons · 16 free
- Data analysis13 chapters · 83 lessons · 11 free
- SQL Performance10 chapters · 49 lessons · 6 free
- ClickHouse8 chapters · 41 lessons · 5 free
- BigQuery8 chapters · 27 lessons · 4 free
- Regex6 chapters · 18 lessons · 3 free
- JSON and nested data6 chapters · 18 lessons · 3 free
- NoSQL in practice9 chapters · 41 lessons · 4 free
- Data Engineering10 chapters · 58 lessons · 6 free
- Kafka10 chapters · 59 lessons · 7 free
Reference on this topic
In-depth articles with syntax and examples in the SQL Arena reference.
Frequently asked questions
What is the best way to learn SQL online?
Use a structured course for sequence and exercises for repetition. Start with SELECT, filtering, sorting, joins, and aggregation before moving into specialized database or performance topics.
Can I learn SQL free online?
The first chapters of SQL Arena courses are free. The SQL Basics course includes 16 free lessons, and the separate practice area includes 292 free tasks across four SQL dialects.
Do I need to install a database to learn SQL?
Not for these courses. Lessons and exercises run in the browser, with separate environments for supported SQL dialects where relevant.
What is the difference between a SQL course and SQL exercises?
A course provides an ordered curriculum and explains concepts before you use them. An exercise library is better for repetition, mixed practice, and checking whether you can choose the right technique independently.
Start learning SQL in the browser
Begin with the free chapters, write the query after each piece of theory, and move into specialized courses when the fundamentals are comfortable.
Start Learning SQLMore practice from CodeRang
- Python ArenaPython Arena has 1300+ Python 3.12 problems covering functions, classes, async code and technical interview tasks.1300+ tasks · Python 3.12
- Playwright ArenaPlaywright Arena has 30 JavaScript and E2E problems where you write a test and immediately see what it did in the browser.30 tasks · JavaScript / E2E