Skip to content

Updated: 09/11/2026

SQL exercises online

SQL is the query language for databases - the same ones behind an online shop, an electronic class register and a phone app. The fastest way to learn it is by practice: you write a query, run it and immediately see the result in a table. On BitWizards you do this in the browser, without installing a database server.

There are three routes (all courses are in Polish):

Practise SQL without signing in

What you will learn

  • SELECT, WHERE, sorting (ORDER BY), LIKE, IN, BETWEEN and functions.
  • Aggregate functions and grouping: COUNT, SUM, AVG, GROUP BY, HAVING.
  • Joining tables: JOIN and LEFT JOIN.
  • Modifying data: INSERT, UPDATE, DELETE.
  • Creating tables, data types, primary and foreign keys, UNIQUE and CHECK constraints.

Basic SQL looks almost identical in SQLite and MySQL. A SELECT with WHERE, JOIN or GROUP BY is written the same way in both, so what you learn in the browser carries straight over to the exam and to work.

SQL exercises with auto-checking

Every exercise has a table with starting data and a task, e.g. “list the titles of games rated above 4, newest first”. When you run your query, the platform compares its result with the result of the model solution. What counts is the content of the result table, not identical query text - the same result can be reached with different queries and every correct one passes. If the task requires sorting, the order of rows matters too.

The course has examples (a ready query you run and modify) and exercises to solve on your own. Completed exercises are marked with a star, so you always know where you left off.

Differences between SQLite and MySQL

This part of the course is useful for anyone who knows or will learn MySQL. You see the differences on working examples, not just in a table:

  • Data types - SQLite has flexible types and accepts text in an INTEGER column, MySQL is strict. See the topic Tables and types: the biggest difference (in Polish).
  • Auto-numbering - INTEGER PRIMARY KEY in SQLite instead of AUTO_INCREMENT in MySQL.
  • Dates - SQLite has no native DATE type; dates are stored as text and handled with date() and strftime().
  • Foreign keys - off by default in SQLite, on from the start in MySQL (InnoDB).
  • UPSERT - ON CONFLICT in SQLite instead of ON DUPLICATE KEY UPDATE in MySQL.

The last topic of the course sums it all up: SQLite in practice + a cheat sheet of differences (in Polish). More about SQLite itself is on the SQLite course page.

MySQL in a browser tab: the student’s own database

PHP exercises with a database run on MariaDB (a MySQL-compatible server) that starts in the student’s browser tab. This is my own environment: I connected a WebAssembly database engine to PHP through my own MySQL protocol server, and added phpMyAdmin in the tab and a history of database changes. As a result:

  • every exercise has a separate database, so students cannot see or break each other’s data,
  • the “Restore starting data” button rebuilds the exercise database in one click, so UPDATE and DELETE can be tried freely,
  • queries are typed in the SQL panel or in a real phpMyAdmin, with nothing to install,
  • every command that changes data goes into the work history, which the teacher can replay.

PHP works on the same database: the student’s script connects through mysqli and generates a page with data, like the application in the exam. Running SQL and PHP on the BitWizards server still exists, but stays in reserve. Without signing in you can practise this in the PHP and MySQL: pages with a database course: queries from PHP, lists and tables, INSERT, UPDATE and DELETE, forms and an INF.03-style project. The basics of PHP itself are in the course PHP: basics in the browser (in Polish).

The teacher sees the student’s work live, can replay the history of writing queries and give a grade on the 1-6 scale. How to set up a class is described on the for schools and getting started pages.

SQL and the INF.03 exam

Databases are part of the name of the INF.03 qualification (Polish vocational IT exam): creating and administering websites, web applications and databases. In the practical part you prepare a database, write SQL queries and use them in a web application, usually together with PHP. The exam uses MySQL or MariaDB, but queries such as SELECT, JOIN, INSERT or UPDATE practised in the SQLite course are written the same way there. Knowing the differences helps avoid traps with types and keys.

SQL in the computer science matura

The Polish computer science matura (school-leaving exam) includes database tasks: several related tables in text files and questions about summaries, counts or records meeting conditions. Such tasks can be solved with SQL queries. The SQLite course teaches exactly these skills: filtering, grouping, aggregation and joining tables. Databases and SQL at the extended level are covered by the class course Informatyka - liceum klasa 3, zakres rozszerzony (general secondary school, grade 3, extended level; topics 27-40), and matura database tasks are revised in grade 4. At the basic level, queries are in the courses general secondary grade 2 and technical school grade 1 (all in Polish). A wider overview of programming at school is on the computer science at school page.

SQLite - PHP - HTML and CSS - JavaScript

Start practising SQL

Frequently asked questions

Can I practise SQL without installing anything or creating an account?

Yes. The SQLite course runs entirely in the browser and is available without signing in: you write a query, click Run and see the result in a table, and the exercises are checked automatically.

Do I need to install MySQL?

No. In PHP exercises with a database, a MariaDB server (compatible with MySQL) starts in the browser tab, together with PHP and phpMyAdmin, in the student's own environment. The SQLite, INF.03 SQL queries and PHP and MySQL courses work without an account. A MySQL server on the BitWizards side remains only as a fallback.

Can I restore the starting data?

Yes. In MySQL exercises one click restores the exercise database to its initial state, and in the SQLite course the database starts fresh on every run. You can experiment without worry.

Is SQL on the INF.03 exam and the matura?

Yes. Databases and SQL are a significant part of the INF.03 qualification, and database tasks in the computer science matura can be solved with SQL queries.

Start now

BitWizards is free. Try the demo without signing in, or sign in to the app to save your progress.

See how to get started