Quiz di SQL: SELECT & WHERE

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.

Facile 10 domande ~5 minuti Superato con il 80% SQLite

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 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;
Mostra la risposta

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.

Cosa copre questo quiz

  • 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

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.