SwadhyAI Notes

All SQL notes

📝SQL exercises

Practice is judgment, not syntax

Practice turns syntax into judgment, use disposable databases, small reproducible datasets, and explicit success criteria per exercise. Exercises should state the expected multiset (order aside unless ORDER BY) so you verify relational outcomes, not accidental row multiplication.

Use transactions you roll back, or containers reset nightly, avoid polluting shared development databases. Link exercises to incident-shaped puzzles (duplicate payments, off-by-one cohorts) when training senior engineers.

Curated SQL problem sets are being added. Soon you will be able to drill timed questions, step-by-step hints, and production-style debugging scenarios in one dedicated practice area.

Until that ships, use the quiz page in this track for quick checks, and open the broader Problem Solving area on the Data Structures & Algorithms path for coding-style practice that complements database work.

Go to Problem Solving (DSA intro)

🚀Coming soon

Roadmap for the dedicated practice area.

Coming soonDescription
Ranked challengesWindow functions, CTEs, and join traps
Explain-the-plan drillsMatch slow plans to index fixes
Schema design promptsModel studies, consent, and billing safely

Exercise anti-patterns

  • Exercises without keys, learners cannot detect join fan-out bugs.
  • Shared environments where learners fight over dropped tables.
  • Solutions that rely on undefined evaluation order.

Run a serious bench

  • Ship seed scripts with deterministic randomness.
  • Add automated check queries where possible.
  • Encourage EXPLAIN as part of the answer key.
  • Rotate exercises when leaks appear on forums.

Environments

One learner dropping a shared table costs everyone, prefer per-user databases or ephemeral containers with a documented reset command.

TL;DR

Hands-on SQL sticks when you type statements yourself in a throwaway database with realistic row counts. Use exercises to practice safe patterns: transactions for multi-step changes, EXPLAIN for plans, and idempotent scripts. This placeholder page exists to wire a future exercise pack, until then, pair each lesson with the in-app SQL editor or a local Docker Postgres instance.