43 lessons with worked examples, result tables and a quiz each. Go from your first SELECT to window functions, and run the examples yourself as you go.
There are 43 lessons, in the order a beginner would need them:
A lesson explains one topic, shows the syntax, and works through examples with their result tables. In the lessons that query the practice database, each example has a link that opens it in the Playground so you can run it and change it. Every lesson ends with a quiz.
After finishing a lesson, head to the SQL Playground to practise against the same database, or try the SQL Challenges, which range from single-table SELECT queries to window functions and CTEs. You can also take a timed SQL Skill Test.
There is nothing to install and no database to configure. You type a query in the browser, it is sent to the SQLab Hub server, run on a SQLite database in an isolated sandbox, and the rows come back in well under a second. The practice database is read-only, so you cannot break it.
The lessons are written and maintained by Rahul Kumar. How the content is made and checked.
No. SQLab Hub is 100% free and every lesson can be read without registering. A free account is only needed if you want your quiz and lesson progress saved across devices.
The lessons teach standard SQL and point out where MySQL, PostgreSQL, SQL Server and SQLite differ. The examples you can run execute on SQLite, because that is the engine behind the Playground.
It depends on the lesson. Short ones such as SELECT DISTINCT or LIKE take 10 to 15 minutes; long references such as Window Functions, Views and Indexes are an hour or more. Each card shows an estimate. With 43 lessons, plan on several weeks of regular practice rather than a weekend.
Yes. The SQL Playground runs your queries on a SQLite practice database with 8 tables and 1,476 rows, and the challenges give you tasks with an expected result to match.
Yes. Every lesson ends with a multiple-choice quiz with an explanation for each answer. The length varies by lesson and is shown on its card.
Start with The BIG 6, then Data Types, SELECT DISTINCT and WHERE, and continue down the list. JOINs, subqueries and window functions assume you are comfortable with the earlier lessons.
No. The Playground accepts read-only queries (SELECT and WITH). Lessons on views, indexes, transactions, stored procedures and triggers explain statements that change a database, so their examples are shown with their results rather than run live.
Write real SQL queries against the 8-table practice database. No signup needed.