TL;DR

The following three games are my favorites to learn and/or improve SQL skills:

Select Star SQL

Free:
Installation required:
Skill level: beginner
Time to complete: About 10-15 minutes per chapter

An interactive book to learn SQL from the very beginning. It is organized in chapters with interactive sections where you first run queries, then alter them and finally write your own ones.

SQL Police

Free: 50/50
Installation required: ⛔
Skill level: beginner

In this game you are a data analyst preparing data. Instead of typing by yourself, you select statements, table names and other operators via the GUI. The game is not fully free, but there are free examples and a full SQL guide under the “guide” tab.

Ingame Screenshot showing a simple tab GUI with a large input in the top half. The mission brief and an SQL cheat sheet are side by side on the lower screen half.

SQL Murder Mystery

Free:
Installation required:
Skill level: medium

Screenshot of SQL Murder Mystery showing the light blue big input field below the game instructions After an introduction you can start querying the database to find out who committed a murder. The game is fully browser based (see Fig. 2). If you want a challenge, try to solve the game in as few queries as possible.