Compare

The 12 Best SQL Practice Sites, Ranked

By Owen Middleton · Updated November 2026 · We ran the examples on PostgreSQL 17

For most people who know the basics, Codewars SQL kata is the best free place to practice SQL. You get 395 SQL kata with no account and no payment, a check on the result of each query, and kata up to window functions. It is at rank 1, with 13 of 13 points. Two things to know: some kata are code puzzles, not data questions, and in our test on a kata with no required order, Codewars failed a correct answer with the rows in another order.

SQLMaxx Learn is our own practice site, and we ranked it with the same six tests as the other eleven sites: it is at rank 1 with Codewars, also at 13 of 13 points.

Choose SQLZoo if you want to practice in MySQL, Microsoft SQL or Oracle, not only PostgreSQL: you choose one of four engines on each exercise, with no account. In our test, SQLZoo accepted a correct answer with the rows in a different order, and it failed an answer with one row missing. It is at rank 3, with 12 of 13.

Choose StrataScratch if you prepare for a SQL interview: start in its free SQL path, where you get a grade with no account, and pay $139 a year only if you want solutions, hints and walkthroughs for all 713 Analytical questions.

Our take. If you can write SELECT and WHERE, we would open Codewars today and start with the 7 kyu kata "SQL Basics: Simple JOIN" and "SQL Basics: Simple GROUP BY". When you fail a kata, compare your row order with the expected rows that Codewars shows: on "SQL Basics: Simple GROUP BY", Codewars failed our right rows in another order, although the kata has no required order. If you use MySQL, Microsoft SQL or Oracle at work, SQLZoo is the better start, because you choose the engine on each exercise. For interview practice, use the free StrataScratch SQL path first, and pay for StrataScratch only when its 69 free Analytical questions are not enough for you. We would not use the W3Schools exercises as your practice: you fill blanks or pick answers, and you never write a full query.

SQL practice sites compared

The 12 best SQL practice sites
Rank Site Best for Price Score Result checkFreeProblemsNo sign-upDepthUpdated
1 Codewars SQL katahow we know Short puzzles, a test on each Free 13 / 13 422221
1 SQLMaxx LearnWe make it A full graded course Free 13 / 13 422221
3 SQLZoohow we know Your choice of four engines Free 12 / 13 421221
4 PostgreSQL Exerciseshow we know PostgreSQL, up to recursive queries Free 11 / 13 421220
4 sql-practice.comhow we know Quick practice, no sign-up Free, with ads 11 / 13 421211
6 SQLBolthow we know Your first week of SQL Free 10 / 13 421210
6 StrataScratchhow we know Interview questions, paid bank $139 a year for all 10 / 13 401221
8 DataLemur SQL questionshow we know Interview questions with company names $15 a month or $60 a year 9 / 13 411120
9 Exercism SQLite trackhow we know SQLite; Exercism says that volunteers give feedback Free 8 / 13 421001
9 HackerRank SQL practicehow we know Short challenges; four engines on the challenge that we opened Free account 8 / 13 421010
11 LeetCode Database problemshow we know Paid interview practice $35 a month or $159 a year 7 / 13 401020
11 W3Schools SQL Exerciseshow we know Keyword quizzes Free; exam $95 7 / 13 220210
  • We count the result check two times: without a check on the result, you can repeat a wrong query and not know it.
  • Codewars and DataLemur keep the top result-check score, but each one failed our right rows when we sorted them in another order.
  • We opened free accounts on DataLemur and HackerRank to try the checks there; we bought no plan on any of these twelve sites.

The SQL practice sites, one by one

1. Codewars SQL kata

Best for many short SQL puzzles, each with a test on the result

  • Price: free; we found no kata for which you need Codewars Red, the paid plan
  • Free graded problems: 395 SQL kata, of which 385 are approved
  • What decides it: a full attempt with no account, in PostgreSQL 13.0 by default. Some kata are code puzzles, not data questions.
  • Limit: On "SQL Basics: Simple GROUP BY", a kata with no required order, Codewars failed our right rows in another order. If you fail a kata, match the order of the expected rows.

how we know

Score: 13 of 13 points.

Go to Codewars SQL kata

1. SQLMaxx Learn

Made by SQLMaxx

Best for a full course of graded problems, from SELECT to window functions

  • Price: free; 615 problems in 66 lessons, and no account to start
  • Practice again later: Review mode, with an account
  • Ours: We made this site, and we gave it no test that we did not give the other eleven practice sites.
  • Strength: You get 615 free graded problems, from SELECT to window functions.
  • Limit: You practice only in PostgreSQL.

Score: 13 of 13 points.

Go to SQLMaxx Learn

3. SQLZoo

Best for practice on the SQL engine of your choice

  • Price: free; we found no paid plan
  • Free graded problems: 132 questions in 13 numbered tutorials
  • What decides it: MySQL, PostgreSQL, Microsoft SQL or Oracle, with MySQL as the default.
  • Limit: Each tutorial is a list of questions with short notes, so learn the idea somewhere else first.

how we know

Score: 12 of 13 points.

Go to SQLZoo

4. PostgreSQL Exercises

Best for PostgreSQL practice up to recursive queries

  • Price: free, with no account; you keep your progress in your browser
  • Free graded problems: 71 exercises
  • What decides it: window functions and WITH RECURSIVE on PostgreSQL 16.13
  • Limit: In all 71, you use one small country-club database, and the newest dated change that we found is from 2020.

how we know

Score: 11 of 13 points.

Go to PostgreSQL Exercises

4. sql-practice.com

Best for a quick session on a hospital database, with no sign-up

  • Price: free, with ads
  • Free graded problems: 69 questions: 54 on a hospital database, 15 on Northwind
  • What decides it: a check that you pass with a new row order, and fail with a short result.
  • Our test: it passed our right rows in a new order and with new column names, and it failed our short result.
  • Limit: You write SQLite, and we found no question filter for window functions.

how we know

Score: 11 of 13 points.

Go to sql-practice.com

6. SQLBolt

Best for your first week of SQL, a lesson and then its tasks

  • Price: free; SQLBolt asks for an optional $4 donation
  • Free graded problems: 53 tasks in 18 lessons
  • What decides it: a check mark on each task as soon as you run it
  • Limit: No window functions or CTEs, and for subqueries, you get a text page with no exercise.

how we know

Score: 10 of 13 points.

Go to SQLBolt

6. StrataScratch

Best for interview questions, if you will pay later

  • Price: Free plan $0; Premium $24 a month, $139 a year or $289 once
  • Free graded problems: 69 of 713 Analytical questions, and 161 items in the free SQL path
  • What decides it: a grade with no account in the free path, and it passed our right rows in another order
  • Limit: Most of the question bank is paid, so we give it 0 on free practice.

how we know

Score: 10 of 13 points.

Go to StrataScratch

8. DataLemur SQL questions

Best for interview questions with company names, in PostgreSQL

  • Price: tutorial free; Premium $15 a month or $60 a year
  • Free graded problems: 89 of the 139 SQL questions that we found
  • What decides it: you need a free account to use Submit, the answer check
  • Limit: On "Histogram of Tweets", a question with no required order, DataLemur failed our right rows in another order. If you fail on Submit, match the order of the expected rows; we passed with the same rows in ascending order.

how we know

Score: 9 of 13 points.

Go to DataLemur SQL questions

9. Exercism SQLite track

Best for SQLite exercises with tests; Exercism says that volunteers give feedback

  • Price: free; Exercism says it is "100% free, forever"
  • Free graded problems: 81 exercises
  • What decides it: Exercism says volunteers give feedback on a solved exercise; we did not try this.
  • Limit: You must sign up to start, and you write SQLite only.

how we know

Score: 8 of 13 points.

Go to Exercism SQLite track

9. HackerRank SQL practice

Best for short challenges; four engines on the challenge that we opened

  • Price: free, with a free account
  • Free graded problems: 58 challenges; 40 are Easy and 2 are Hard
  • What decides it: you sign up to run any query. With our free account, HackerRank solved-marked our reordered right rows and gave 0 points to a short result.
  • Limit: We found no window functions.

how we know

Score: 8 of 13 points.

Go to HackerRank SQL practice

11. LeetCode Database problems

Best for paid interview practice in four SQL engines

  • Price: Premium $35 a month or $159 a year
  • Free graded problems: 105 of 323, with all 50 of the SQL 50 plan
  • Limit: You must sign up to run a query, and we could not see the check work.

how we know

Score: 7 of 13 points.

Go to LeetCode Database problems

11. W3Schools SQL Exercises

Best for a keyword quiz after you read a tutorial chapter

  • Price: exercises free; the SQL certificate exam is $95
  • Free graded problems: none with a full query; 300 quiz questions in 60 sets
  • Limit: You pick answers or fill blanks, so you never write and run a query.

how we know

Score: 7 of 13 points.

Go to W3Schools SQL Exercises

We did not rank these sites in this list:

  • SQL games, such as SQL Murder Mystery, and our own games, Station Zero and the SQL Block Game.
  • Khan Academy and ThoughtSpot. They are courses, so we ranked them on our list of free SQL courses.
  • Kaggle Learn. It is a course with a certificate, so we review it on our list of free SQL certificates.
  • sql-practice.online and SQiLs. We could not check their facts.
  • ChatGPT and Claude. They are not sets of problems.
  • Courses such as DataCamp, LearnSQL.com and Udemy. They are courses, not practice sites.

Which SQL practice site should you pick?

To find the best place to learn and practice SQL, start from what you need:

  • SQL practice for beginners (you know only the basics): Codewars SQL kata, SQLMaxx Learn, SQLZoo, PostgreSQL Exercises, sql-practice.com and SQLBolt. If joins are new to you, read how Joining Multiple Tables works first.
  • You want the best SQL course with practice in each lesson: SQLMaxx Learn and SQLBolt.
  • You want many SQL training exercises with a check: Codewars SQL kata and SQLMaxx Learn.
  • You want to practice PostgreSQL: Codewars SQL kata, SQLMaxx Learn, SQLZoo, PostgreSQL Exercises, StrataScratch, DataLemur SQL questions and LeetCode Database problems.
  • You want no account: Codewars SQL kata, SQLMaxx Learn, SQLZoo, PostgreSQL Exercises, sql-practice.com, SQLBolt, StrataScratch and W3Schools SQL Exercises.
  • You want free problems up to window functions: Codewars SQL kata, SQLMaxx Learn, SQLZoo, PostgreSQL Exercises, StrataScratch, DataLemur SQL questions and LeetCode Database problems.
  • You finished SQLZoo: Codewars SQL kata, SQLMaxx Learn, PostgreSQL Exercises, StrataScratch, DataLemur SQL questions and LeetCode Database problems are SQLZoo alternatives with a result check and free problems up to window functions.
  • You prepare for a job interview: use StrataScratch, DataLemur SQL questions and LeetCode Database problems, and learn how to practice SQL for interviews.

Questions about SQL practice sites

What's the best way to practice SQL?

Write full queries on a site where you get a check on the result of each query, and come back to the same topic some days later. With a quiz where you pick answers or fill blanks, you do not learn to write a query. On Codewars, you can open the kata that you completed and train on them again. In SQLMaxx Learn, you practice again in Review mode, with an account.

How can I practice SQL online for free?

Open Codewars SQL kata, SQLZoo, PostgreSQL Exercises, sql-practice.com or SQLBolt. On these five sites, all problems are free, you need no account, and you get a check on the result of each query. SQLMaxx Learn, our own course, is free in the same way. The W3Schools exercises are free with no login too, but you do not write a full query.

Can you do SQL on LeetCode?

Yes, in MySQL, SQL Server, PostgreSQL or Oracle, but you must log in or sign up to run or submit a query. 105 of its 323 Database problems are free, with all 50 problems of the SQL 50 plan. For the other 218, you need Premium, $35 a month or $159 a year.

Is DataLemur SQL practice paid?

Partly. The SQL tutorial is free, and of the 139 DataLemur SQL questions that we found, 89 are free. Premium is $15 a month or $60 a year. To use Submit, the answer check, you need a free account.

Try a SQLMaxx Learn task

For this task, use the employees table of a tech company:

Schema · hr1 table? = nullable
employees
idinteger
nametext
emailtext
department_id?integer
manager_id?integer
hire_datedate
titletext
is_activeboolean

The SQL task on the employees table

Each row of employees is one person. The manager_id of a person is the id of the manager, in the same table. For 1 of the 60 employees, manager_id is NULL. This task is from the Self-Joins lesson, lesson 21 of 66. To practice all 615 problems in order, start the SQLMaxx Learn course.

How we checked the SQL practice sites

We give each site a score on each of these six tests. For the free practice, free problems and depth tests, we count all the free problems on a site: the question lists and the practice problems in the lessons.

You get a check on the result of your query (the "Result check" column). 2 if you get a check on the result of your query. We give 2 only when we saw this check, or when the company says so. 1 if you get a check of a different kind, for example on fill-in blanks or multiple choice. We also give 1 when you get a check, but we did not see it, and we found no statement from the company about it. 0 if you check your answers yourself, or if we found no check.

How much of the practice is free (the "Free" column). 2 if all problems are free. 1 if more than half of the problems are free, and you pay for the others. 0 if half of the problems or fewer are free, or if we could not count the free part.

How many graded problems are free (the "Problems" column). We count only the free problems where you write a full query and get a check. 2 if there are 300 or more. 1 if there are 50 to 299. 0 if there are fewer than 50, or if we found no count.

Start with no account and no installation (the "No sign-up" column). 2 if, with no account and no installation, you can open a problem, run your query or give your answer, and get a check. 1 if you can run your query with no account, but you need an account for the check. 0 if you need an account or an installation for this, or if we found no way to do it with no account.

How far the free problems go (the "Depth" column). 2 if you get free problems on joins, GROUP BY, subqueries and window functions. 1 if you get free problems on joins and GROUP BY. 0 if you get fewer topics, or if we found no topic list for the problems.

Updated in the last two years (the "Updated" column). 1 if the company gives a date of change for its practice pages from the last two years: a date on the page, or a date that it gives search engines for the page. We do not count a copyright year in a footer. We also do not count a date for search engines that is the same as the day that we read it. So a 0 means that we found no date of change from the last two years.

We give the same rank to sites with the same total. Inside a shared rank, we list the other sites in alphabetical order and our own course last.

For the update test of our own course, we use the newest change date of our 66 lesson pages: September 14, 2026.

We chose the bands of the free problems test, and they are an advantage for our own course, with 615 free graded problems. We also count the result check test two times. Here are the orders without these two choices.

Without the double weight on the result check test, we list the sites in a different order: 1. Codewars SQL kata and SQLMaxx Learn, with 11 points; 3. SQLZoo, with 10 points; 4. PostgreSQL Exercises and sql-practice.com, with 9 points; 6. SQLBolt and StrataScratch, with 8 points; 8. DataLemur SQL questions, with 7 points; 9. Exercism SQLite track, HackerRank SQL practice and W3Schools SQL Exercises, with 6 points; 12. LeetCode Database problems, with 5 points.

Without the free problems test, we list the sites in a different order: 1. Codewars SQL kata, SQLZoo and SQLMaxx Learn, with 11 points; 4. PostgreSQL Exercises and sql-practice.com, with 10 points; 6. SQLBolt and StrataScratch, with 9 points; 8. DataLemur SQL questions, with 8 points; 9. Exercism SQLite track, HackerRank SQL practice and W3Schools SQL Exercises, with 7 points; 12. LeetCode Database problems, with 6 points.

Without the double weight and without the free problems test, we list the sites in a different order: 1. Codewars SQL kata, SQLZoo and SQLMaxx Learn, with 9 points; 4. PostgreSQL Exercises and sql-practice.com, with 8 points; 6. SQLBolt and StrataScratch, with 7 points; 8. DataLemur SQL questions and W3Schools SQL Exercises, with 6 points; 10. Exercism SQLite track and HackerRank SQL practice, with 5 points; 12. LeetCode Database problems, with 4 points.

The full method is on one page: how we score practice sites.

SQLZoo

We give the facts behind the card and the table row first, then the facts behind each test score.

SQLZoo

PostgreSQL Exercises

We give the facts behind the card and the table row first, then the facts behind each test score.

PostgreSQL Exercises

  • PostgreSQL Exercises SQL topics, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises free use, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises strength, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises account, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises content, checked October 20, 2026 — source · our notes
  • PostgreSQL Exercises SQL engines, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises limit, checked October 20, 2026 — source · our notes
  • PostgreSQL Exercises price, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises query check, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises content, note 2, checked October 15, 2026 — source · our notes
  • PostgreSQL Exercises update, checked October 20, 2026 — source · our notes

SQLBolt

We give the facts behind the card and the table row first, then the facts behind each test score.

SQLBolt

sql-practice.com

We give the facts behind the card and the table row first, then the facts behind each test score.

sql-practice.com

W3Schools SQL Exercises

We give the facts behind the card and the table row first, then the facts behind each test score.

W3Schools

DataLemur SQL questions

We give the facts behind the card and the table row first, then the facts behind each test score.

DataLemur

LeetCode Database problems

We give the facts behind the card and the table row first, then the facts behind each test score.

LeetCode

HackerRank SQL practice

We give the facts behind the card and the table row first, then the facts behind each test score.

HackerRank

StrataScratch

We give the facts behind the card and the table row first, then the facts behind each test score.

StrataScratch

Codewars SQL kata

We give the facts behind the card and the table row first, then the facts behind each test score.

Codewars

Exercism SQLite track

We give the facts behind the card and the table row first, then the facts behind each test score.

Exercism