Library of PDF
SQL: Zero to Advanced
SQL: Zero to Advanced
Couldn't load pickup availability
Most SQL tutorials stop at SELECT and JOIN. SQL: Zero to Advanced takes you all the way, using one small sample database (Bean Street Coffee: customers, products, orders, employees) from the first page to the last, so every new idea builds on tables you already know.
The guide has three colour-coded levels, so you can start where you are. Beginner covers running SQL in five minutes, SELECT, WHERE, ORDER BY, LIMIT, NULL, CASE and casting, text and date functions, aggregates, GROUP BY and HAVING, INNER, LEFT, RIGHT, FULL, CROSS and self joins, plus join traps, then INSERT, UPDATE, DELETE and CREATE TABLE. Intermediate covers scalar, IN, EXISTS and correlated subqueries, derived tables, UNION/INTERSECT/EXCEPT, CTEs, ranking and running-total window functions, conditional aggregation and pivots, keys and constraints, ALTER TABLE, views and materialized views, UPSERT and RETURNING, and normalization. Advanced covers recursive CTEs (loops, trees, calendars), islands and de-duplication with windows, transactions and ACID, isolation levels with a live PostgreSQL lab, locks and deadlocks, write skew and SERIALIZABLE retries, indexes and how they work, reading EXPLAIN plans, slow-query fixes, triggers, functions and stored procedures, JSON in SQL, SQL injection and parameterized queries, allow-lists, roles, GRANT and row-level security, and a side-by-side tour of SQLite, PostgreSQL and MySQL.
Every query was run before publishing, and the output printed in the guide is the real output: SQLite 3.46 for most examples, PostgreSQL 17 where a feature needs it (isolation, locks, procedures, roles, RLS, EXPLAIN ANALYZE). The MySQL notes are a reference table and were not run. Both full sample-database scripts are printed in the appendix and attached inside the PDF, so you can load the data in a minute.
What you get
- Three levels, 20 sections: beginner → intermediate → advanced, with level badges on every page
- 135+ tested queries, each with its real output, plus diagrams for joins, query order, indexes and transactions
- One sample database (6 tables) used throughout, with ready-to-run scripts for SQLite and PostgreSQL attached to the PDF
- Concurrency labs on real PostgreSQL: isolation levels (dirty, non-repeatable and phantom reads explained), row locks, a real deadlock, write skew and the SERIALIZABLE retry pattern
- Performance: index timing demo, EXPLAIN QUERY PLAN and EXPLAIN ANALYZE, covering and composite indexes, and a "why is my query slow" checklist
- Security: a SQL injection demo (bad vs. good results side by side), parameterized queries in Python, allow-lists for ORDER BY and IN lists, roles, GRANT and row-level security
- Two projects: a monthly sales report (CTEs + windows + pivot) and a library database built from scratch with constraints, triggers and tests, each with "level up" challenges
- Practice: a 12-question quiz with answer key, 12 fillable exercises with a fully worked (and tested) answer key, 8 project ideas with progress boxes, a 6-week roadmap and a fillable notebook
- Reference: four dense cheat sheets (24 of 27 cards run live), a 33-term glossary, a free next-steps resource page and the full SQL scripts
Interactive features
- Clickable table of contents, plus a "Contents" button on every page
- Full PDF bookmarks panel (89 entries)
- 238 internal links: cross-references, "Help" and "Review" links, exercise ↔ answer links
- 71 live links (49 unique) to the SQLite, PostgreSQL, MySQL and OWASP docs and other free resources
- 170 fillable fields: 108 checkboxes (quiz, roadmap, challenges, project ideas, progress) and 62 text fields (exercise answers, notes, learning log, quiz score). Everything saves with the file.
- Two SQL scripts attached to the PDF (open the attachments panel in Acrobat/Reader)
Good for
Beginners who want one guide that grows with them, analysts and students who know SELECT but get stuck on joins and windows, developers who want to understand transactions, indexes and injection properly, and anyone preparing for a data or backend interview.
Share
