Skip to main content

Chapter 21A: Reading the SQL Your Agent Wrote Quiz

Twenty questions. No tricks. If you have walked through the eight lessons and the capstone, you will know these answers. Each question maps to one of the silent failure modes or one of the reading habits the chapter taught.

Scoring guidance:

  • 18-20: ready to review agent-produced SQL in production
  • 15-17: solid foundation, revisit the lessons where you missed
  • 11-14: redo the capstone before relying on this skill at work
  • <=10: rerun the chapter starting at Lesson 1, slowly

Best practice: answer once without notes, then review misses and retake after targeted repair.

What This Quiz Measures

  • the five reading questions
  • the four silent SQL failures
  • INNER vs LEFT JOIN behaviour
  • HAVING vs WHERE
  • NULL behaviour in filters and aggregates
  • safe write practice (BEGIN/ROLLBACK, missing WHERE detection)
  • schema reading and constraint recognition
  • JSONB and pgvector recognition
  • EXPLAIN plan reading at the Seq Scan vs Index Scan level

Question-to-Outcome Map

Outcome IDs:

  • O1 Reading posture and silent failure recognition
  • O2 SELECT/WHERE/ORDER BY/LIMIT reading
  • O3 JOIN reading (INNER vs LEFT, missing rows)
  • O4 GROUP BY / HAVING / aggregate traps
  • O5 Write reading and transaction safety
  • O6 Schema and constraint reading
  • O7 JSONB, pgvector, EXPLAIN recognition
QuestionPrimary outcome
Q1O1
Q2O1
Q3O2
Q4O2
Q5O2
Q6O3
Q7O3
Q8O3
Q9O4
Q10O4
Q11O4
Q12O5
Q13O5
Q14O5
Q15O6
Q16O6
Q17O6
Q18O7
Q19O7
Q20O7
Checking access...