Code and datasets for Head First SQL, 2nd edition by Kimberly Fessel.
Published by: O'Reilly Media, June 2026.
This repository is indended for readers following along with the book. It contains scripts for recreating the chapter datasets.
The .sql files allow readers to build the bookβs datasets locally and practice SQL by working through the examples and exploring the data themselves.
βββ README.md
βββ datasets/
βββ appendix_i/ trees.sql
βββ chapter_01/ locations.sql
βββ chapter_03/ foods_setup.sql
βββ chapter_05/ neighborhood_db_setup.sql
βββ chapter_08/ travel_db_setup.sql
βββ chapter_10/ camp_calloway_db_setup.sql
βββ chapter_15/ checking.sql
Data files are organized by the chapter in which they are first introduced. All datasets can be found in the datasets/ directory.
- MySQL (Version 8.0+) preferred
Get your own copy of MySQL Community Edition for free. Just select your OS and follow the installation instructions. See also Appendix II (B) in the book.
If you would like to use a different RDBMS (PostgreSQL, SQLite, etc.), note that you may need to occassionally update the book syntax.
Kimberly Fessel is a data scientist, educator, and founder of Dr Kim Data, a consultancy focused on data education and practical machine learning solutions. With more than a decade of teaching experience, she has educated students and professionals in corporate settings, universities, online platforms, and as a director at a data science bootcamp.
Known for her visual and intuitive teaching style, Kimberly helps learners make sense of complex technical concepts through approachable, hands-on instruction. Her educational YouTube channel has grown to more than 20,000 subscribers. She holds a Ph.D. in Applied Mathematics from Rensselaer Polytechnic Institute.