SQL Practice Workbook — 100 Questions with Sample Database
Reading about SQL doesn't make it stick. Writing 100 queries against a real database does.This workbook ships a complete SQLite sample database — customers, orders, products, employees, payments, with the NULLs, duplicate names, split payments and edge rows real data has — plus 100 questions from warmup to interview-hard:• 25 join questions — INNER, LEFT, self-joins, anti-joins, and the WHERE-vs-ON trap• 30 aggregation & subquery questions — GROUP BY, HAVING, correlated subqueries, EXISTS, CTEs• 20 window function questions — ROW_NUMBER, RANK, LAG/LEAD, running totals, top-N per group• 15 design & performance questions — normalization calls, index choice, EXPLAIN reasoning• 10 full interview scenarios — multi-step problems the way interviewers actually ask themEvery question has a difficulty rating and an expected-output description. Every answer shows the SQL, the verified result, WHY it works — and the common wrong answer where it matters. Before publishing, ~89 of the 100 answers were executed against the sample database; every stated row count comes from real output.Load the database in one command (SQLite — Postgres and MySQL notes included). Attempt, check, repeat.The design/theory companion: SQL & Database Design Pack — https://generalistprogrammer.gumroad.com/l/sql-database-design-packWhat you get: workbook as PDF + Markdown, the runnable .sql sample database, full answer key. Lifetime updates.
Get it → generalistprogrammer.gumroad.com