SQL Refresh Test

Updated · 5 min read
mediumPostgreSQL 18sqltestquizassessment

This test checks the 16 lessons of the Refresh path: NULL logic, joins, upserts, transactions, windows, isolation, plans and pagination. It is 20 multiple-choice questions, marked for you as soon as you submit. Each answer explains why, and links to the lesson that teaches it, so a wrong answer tells you exactly what to reread.

How the Test Works

  • Questions: 20, about one per lesson or topic on the path.
  • Time: about 30 minutes, without notes.
  • Pass mark: 15 out of 20.
  • Hands-on practice: the SQL Problem Lab has business requests to solve with real queries on the shop dataset.

The Test

SQL Refresh Test

20 questions
1NULL = NULL evaluates to:
2WHERE a = 1 OR b = 2 AND c = 3 is read as:
3The logical order of a query is:
4LEFT JOIN payments p ON ... WHERE p.method = 'card' keeps students with no payments?
5Which anti-join is safe when the subquery column can contain NULL?
6CASE returns:
7PostgreSQL's upsert is:
8A failed statement inside an explicit PostgreSQL transaction:
9A CTE referenced twice is, in PostgreSQL 12+:
10ROW_NUMBER, RANK and DENSE_RANK differ on:
11sum(x) OVER (ORDER BY d) with duplicate d values, by default:
12PostgreSQL's default isolation level is:
13EXPLAIN without ANALYZE:
14The best column order for an index serving WHERE status = ? AND created_at > ? is:
15Which is safe in application code?
16Page 500 of a list with OFFSET is slow because:
17count(DISTINCT student_id) counts:
18COALESCE(sum(amount_usd), 0) is needed when:
19Which predicate can use a plain index on paid_on?
20Two sessions update the same two rows in opposite order. PostgreSQL:

What Your Score Means

ScoreWhat to do
18 to 20Excellent. Try the SQL Query Puzzles and the SQL Mock Interview.
15 to 17A pass. Reread the lessons linked from the questions you missed.
Below 15Not yet. Work through the linked lessons and take the test again.

Was this tutorial helpful?