SwadhyAI Notes

All SQL notes

❓SQL quiz

Crisp answers, real bugs

Quizzes validate reading SQL, predicting results, and spotting bugs, focus on NULL, duplicates, and join-order edge cases. Each question should have a crisp multiset answer; explain why alternatives fail relationally.

When you graduate to plan quizzes, use anonymized shapes from real regressions so recognition matches production. Use quizzes in onboarding gates before production database access.

Quick checks, expand this page over time as the track grows.

Weak quiz design

  • Ambiguous questions with multiple defensible answers.
  • No explanation keys, learning value is low.
  • Questions that depend on undefined ordering.

High-signal items

  • Publish rationale with every answer.
  • Rotate questions as leaks appear.
  • Include “find the bug” with join fan-out.
  • Tie harder items to incident postmortems.

🎯Try it

Pick one option, then advance.

What does WHERE drop when a predicate compares a column to NULL using = ?

Plans

When quizzing execution plans, teach recognition of nested loops vs hash joins vs sequential scans, not vendor trivia without a workload story.

TL;DR

These quizzes stress NULL + join semantics and basic relational reasoning, skills that prevent subtle production bugs more than memorizing syntax. When you miss one, revisit the underlying lesson (NULL, OUTER joins, aggregates) with a tiny repro table until the answer feels obvious, not lucky.