SQL exercises with solutions, topic by topic

SQL exercises with solutions, topic by topic

Updated on

Here are 196 SQL exercises with solutions, taken from SpeedQL’s questions and sorted by the game’s 16 topics. Each exercise gives the task, the starting tables, a hint, the solution and the expected result, computed with SQLite. Try writing your query first, then open the solution.

The 16 SQL topics

To go further: the SQL cheat sheet sums up each topic, and the custom exercises check your queries live, with every question in the game.