CodeRang
SQL Arena by CodeRang

SQL practice online with real problems and instant checking

Practice SQL with 1,192 problems. Write queries against real tables in your browser and have every solution checked automatically on hidden data.

Free plan, no card required. Includes 292 free problems.

  • PGPostgreSQL
  • MyMySQL
  • ClickHouse
  • BigQuery
PrevNextRandom
TaskSubmissionsAI Mentor
Five Drivers with Most Trips

The ride-hailing service is building a ranking of its busiest drivers. For every driver count the total number of their rides in the service history — regardless of ride status, cancelled ones count too. Find the top 5. Output name and ride_count. Sort by the ride count, descending.

Query 1PostgreSQLv16
SELECT d.name,
       COUNT(r.id) AS ride_count
FROM drivers d
JOIN rides r ON r.driver_id = d.id
GROUP BY d.name
ORDER BY ride_count DESC
LIMIT 5;
Submit
Resultdriversrides
Answer accepted
SQL practice problems with automatic checking
1,192
SQL practice problems with automatic checking
tracks for a job role or goal
12
tracks for a job role or goal
SQL dialects with separate sandboxes
4
SQL dialects with separate sandboxes
problems in the free plan, no card
292
problems in the free plan, no card

More than a list of SQL exercises

  • Interview-style SQL problemsSQL Arena includes problems seen in interviews at Yandex, Ozon, T-Bank and other tech companies.
  • Interview modePractice under a server-side timer with hints disabled, then review a report after the session. The free plan includes one attempt per day.
  • AI mentorAsk for a hint when you are stuck or get an explanation of why a query failed. The free plan includes 10 AI hints in total, while Premium removes the limit.
  • AI-generated practicePremium can generate up to 10 new problems per day based on your level, focusing on the topic where you make the most mistakes.
  • EXPLAIN and ER diagramsInspect table relationships visually and analyze how a database executes your query with EXPLAIN.
  • Progress trackingSQL Arena includes rankings, streaks and achievements alongside your solved-problem history.

How SQL practice works

There is nothing to install or configure. Open a problem, write a query, run it, and see whether your solution actually works.

  1. 01

    Open a problem

    Every problem has its own tables and data. Use the ER diagram to inspect the schema and understand the relationships before writing your query.

  2. 02

    Write the SQL

    Use a browser-based sandbox for PostgreSQL, MySQL, ClickHouse or BigQuery. Each dialect runs in its own environment.

  3. 03

    Check the result

    Your answer is tested against hidden data and compared with the expected result. A query that only happens to fit the visible example will not pass.

  4. 04

    Understand what went wrong

    Use the AI mentor for a hint or an explanation of an error. For performance work, inspect the query plan with EXPLAIN.

SQL practice by topic

Pages for a specific goal: a dialect, a query topic, a job role or interview prep.

12 guided SQL practice tracks

All tracks

Use a track when you want a structured sequence instead of picking SQL exercises one by one. Available tracks include SQL from scratch → Analyst with 63 problems, SQL for Backend Developers with 60, SQL for QA Engineers with 59 and SQL for Data Engineers with 56. There are also tracks for interview prep, window functions, CTEs, query optimization, real-world SQL, MySQL, ClickHouse and BigQuery.

10 courses combining explanation and practice

All courses

Each lesson connects theory with a task you can complete directly in the browser. The catalog includes SQL from Scratch with 12 chapters and 77 lessons, including 16 free lessons, plus Data Analytics with Python and pandas, BigQuery, SQL Performance, ClickHouse, regular expressions in SQL, JSON and nested data, NoSQL in Practice, Data Engineering and Kafka. The first chapters are free.

Practice PostgreSQL, MySQL, ClickHouse and BigQuery online

SQL syntax and behavior vary between databases, so SQL Arena provides four separate sandboxes: PostgreSQL, MySQL, ClickHouse and BigQuery. Everything runs in the browser. You can practice SQL online in the dialect you use at work or expect to see in an interview.

SQL interview questions practice

SQL Arena includes interview-style problems from Yandex, Ozon, T-Bank and other tech companies. One Easy Yandex problem, “Five drivers with the most rides,” asks you to count every ride for each driver, including canceled rides, and return the top five by ride count. A solution uses JOIN, GROUP BY, ORDER BY and LIMIT. Interview mode adds a server-side timer, disables hints and gives you a report after the session.

SQL for beginners, from first queries to interview problems

Beginners can start with the SQL from Scratch course and matching practice track, then move on to JOINs, aggregation, subqueries, CTEs, window functions, performance and interview-style problems. A SQL reference covers commands and functions when you need to check syntax, and the blog provides additional material on individual topics.

Free SQL practice and Premium

You can start practicing without paying and without entering a card.

Free plan

  • 292 free problems across PostgreSQL, MySQL, ClickHouse and BigQuery
  • Instant automatic checking
  • 10 AI hints in total
  • EXPLAIN
  • Interview mode once per day
  • Rankings, streaks and achievements
Start for free

Premium

  • Medium, Hard and Expert problems, including interview-style problems
  • Unlimited AI mentor
  • Up to 10 AI-generated problems per day based on your level
  • One-on-one duels
  • Timed certification exam
  • Top community solutions
Premium

SQL practice FAQ

Where can I practice SQL online?

SQL Arena lets you practice SQL directly in your browser with no database setup. It supports PostgreSQL, MySQL, ClickHouse and BigQuery, and every solution is checked automatically.

Is there a free SQL practice website?

Yes. The free plan includes 292 SQL problems across all four supported dialects, automatic checking, EXPLAIN and other practice features. No card is required.

How do I practice SQL as a beginner?

Start with the SQL from Scratch course and the SQL from zero → Analyst track. The course contains 12 chapters and 77 lessons, 16 of them free.

Can I practice SQL interview questions online?

Yes. SQL Arena includes problems seen in interviews at Yandex, Ozon, T-Bank and other tech companies. Interview mode adds a server-side timer and removes hints during the session.

How are SQL practice problems checked?

Your query is tested on hidden data rather than only the visible sample. The result is compared with the expected output, so the solution has to work beyond one example.

Can I practice BigQuery and ClickHouse online?

Yes. SQL Arena has separate browser-based sandboxes for BigQuery and ClickHouse, as well as PostgreSQL and MySQL. Nothing needs to be installed locally.

Are there hints for SQL exercises?

Yes. The AI mentor can provide a hint or explain an error in your query. The free plan includes 10 AI hints in total, while Premium provides unlimited access.

Should I learn SQL with a course or practice problems?

A course is useful when you need concepts in a structured order, while practice problems help you turn those concepts into working queries. SQL Arena provides both, so you can move directly from a lesson to hands-on SQL exercises.

Practice SQL by writing queries, not just reading about them

Choose a dialect, open a problem and write your query in the browser. SQL Arena will run it against hidden data and show whether the solution is correct.

Open SQL Arena