A review query should make projection, filtering, and ordering easy to inspect in one small result set.

Program

Play the script to choose the minimum score and review how the SELECT query filters rows.

select_filter_practice.sql
CREATE TABLE quiz_scores (student TEXT, topic TEXT, score INTEGER);
INSERT INTO quiz_scores VALUES ('Ada', 'joins', 92), ('Lin', 'joins', 75), ('Mira', 'ctes', 88), ('Noor', 'windows', 67);
WITH params(min_score) AS (VALUES ()) SELECT student, topic, score FROM quiz_scores WHERE score >= (SELECT min_score FROM params) ORDER BY score DESC, student;
CREATE TABLE quiz_scores (student TEXT, topic TEXT, score INTEGER);
INSERT INTO quiz_scores VALUES ('Ada', 'joins', 92), ('Lin', 'joins', 75), ('Mira', 'ctes', 88), ('Noor', 'windows', 67);
WITH params(min_score) AS (VALUES ()) SELECT student, topic, score FROM quiz_scores WHERE score >= (SELECT min_score FROM params) ORDER BY score DESC, student;
CREATE TABLE quiz_scores (student TEXT, topic TEXT, score INTEGER);
INSERT INTO quiz_scores VALUES ('Ada', 'joins', 92), ('Lin', 'joins', 75), ('Mira', 'ctes', 88), ('Noor', 'windows', 67);
WITH params(min_score) AS (VALUES ()) SELECT student, topic, score FROM quiz_scores WHERE score >= (SELECT min_score FROM params) ORDER BY score DESC, student;
projection The SELECT list controls which columns appear in the result.
filter The WHERE clause keeps rows whose score meets the selected threshold.
ordering ORDER BY makes the review result stable and easy to compare.