SQL SELECT & WHERE Quiz

This SQL quiz checks the two clauses every query starts with, SELECT and WHERE. You will predict query results, combine conditions with AND and OR, and spot why a query fails.

Easy 10 questions ~5 minutes Pass at 80% SQLite

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

What does this query return?

CREATE TABLE users (id INTEGER, name TEXT, age INTEGER, city TEXT);
INSERT INTO users VALUES (1, 'Ana', 31, 'Paris'), (2, 'Ben', 25, 'Rome'), (3, 'Cy', 40, 'Paris');
SELECT name FROM users WHERE id = 2;
Show the answer

A. Ben WHERE id = 2 keeps only Ben's row, and SELECT name returns just the name column. The id is used for filtering but not returned.

What this quiz covers

  • Choosing columns with SELECT and SELECT *
  • Filtering rows with WHERE and comparison operators
  • Combining conditions with AND, OR and parentheses
  • Quoting text values with single quotes
  • Why a column alias cannot be used in WHERE

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.