NEW! Explore Our New Platform, the Playback Press
Learn from all of your favorite code playbacks (including the ones in this book) on our brand-new site, the Playback Press.
At the Playback Press, every playback is equipped with an AI assistant that's ready to answer your questions and to test your knowledge of the material you are learning. Watch this video, "How to View a Code Playback", to see these exciting new features in action. It's like having a personal tutor right at your fingertips!
All of our books remain free of charge, check them out now!
This is a collection of 30 'worked examples' where I show the viewer how I go about writing SQL queries. SQL queries are rarely written left-to-right, top-to-bottom. Instead, a database developer typically builds their queries up from small and simple to more complex. These playbacks show how my queries grow as I get closer and closer to a correct solution. They also emphasize how to use an ER Diagram and schema when writing queries.
The database I am using describes courses taken by students in a university. It is a SQLite database called studentGrades.sqlite. Here are the entities and relationships:
Entites:
Relationships:
Here is an ER Diagram and schema describing the database:
If you are brand new to SQL you might want to start with another one of my 'books' of code playbacks:
Database Design and SQL for Beginners
If you would like to learn how to write programs that use a database you can read:
Programming with SQLite.
If you'd like to stay connected and get updates when I add new playbacks you can follow me on twitter:@markm208.