Brainlag
  1. SQL
  2. Foundations
07/39 lessons

Checkpoint: the game launcher

Checkpoint30 min6 problems

Learn

How this checkpoint works

Six questions about a game launcher: games, players and a month of sessions. Everything you need is in Foundations: picking columns, WHERE, AND and OR, LIKE, ORDER BY, LIMIT and DISTINCT.

No hints until you have checked once. The solution opens after three checks, or if you give up, but then the checkpoint is not cleared this time. Read each question twice. Most misses are a question answered slightly differently from the one asked.

Checkpoint

Cheap multiplayer games

Return the title and price of every multiplayer game (multiplayer is 1) that costs less than 10. Cheapest first; games with the same price in alphabetical order of title.

On your own: hints appear after your first check, a solution after 3 checks or if you give up.

exercise_1.sql to run
-- Your query here

Checkpoint

Top three by critics

Return the title of the three games with the highest critic_score, best first, and a second column named out_of_10 that shows the score out of 10 (so 87 becomes 8.7).

On your own: hints appear after your first check, a solution after 3 checks or if you give up.

exercise_2.sql to run
-- Your query here

Checkpoint

Genres with a free game

Return every genre that has at least one free game (price is 0), each genre once, in alphabetical order.

On your own: hints appear after your first check, a solution after 3 checks or if you give up.

exercise_3.sql to run
-- Your query here

CheckpointPredict the output

Horror or cheap puzzles

What does this query return? One title per line.

Read the program, type exactly what it prints, then lock it in. It runs after that.

exercise_4.sql
SELECT title
FROM games
WHERE genre = 'horror' OR genre = 'puzzle' AND price < 5
ORDER BY title;

CheckpointFix the bug

No kingdoms found

This should return the title and year of every game with King anywhere in its title, oldest first. It returns nothing. Fix it.

On your own: hints appear after your first check, a solution after 3 checks or if you give up.

exercise_5.sql to run
SELECT title, year
FROM games
WHERE title = '%King%'
ORDER BY year;

Checkpoint

New players from home

Return the gamertag and country of players from the UK or Ireland who joined on or after 1 January 2025 (joined_on is stored like 2025-01-01), earliest joiner first.

On your own: hints appear after your first check, a solution after 3 checks or if you give up.

exercise_6.sql to run
-- Your query here
Step 1 of 7
SQLite

Code editor. Press Control or Command plus Enter to run the code. Tab indents; to move focus out of the editor, press Escape and then Tab.