Overview

1 Before you begin

Data now permeates every aspect of life, and organizations treat it as a core asset that must be stored securely, scaled as it grows, and made searchable. Relational databases have served this role reliably for decades, and their real value emerges when people can query and change the data. That is where SQL comes in: it is the universal, vendor-spanning language for working with relational data. Although SQL isn’t a general-purpose programming language, its focus is its strength, and its longevity means the time invested in learning it pays off for years across roles and industries.

This book welcomes readers with or without software backgrounds, emphasizing approachable, English-like SQL that quickly becomes practical. It highlights how analysts, marketers, and finance professionals can answer real business questions directly, while also serving developers, DBAs, and data scientists who need a pragmatic path to proficiency. While the lessons use MySQL, the concepts transfer to other major relational systems, with only minor, noted differences between platforms, so the skills you build will travel with you.

You’re guided to learn in focused daily sessions: early chapters establish core ideas and tools, the main sequence builds skills progressively, and nearly every chapter includes hands-on labs to reinforce learning, plus suggestions for deeper exploration. Getting started is lightweight: install MySQL and MySQL Workbench, then load a prepared sample database so you can practice immediately. Supplementary online materials demonstrate environment setup and provide every script used in the book—intended primarily for troubleshooting—while encouraging you to type queries yourself to cement understanding.

Being immediately effective with SQL

As with every other book in the Month of Lunches series, the primary goal of this book is for you to be immediately effective with SQL. In nearly every chapter that follows, a particular part of the SQL language will be presented and briefly discussed, though the majority of any given chapter will focus on how to apply what you just learned, using real-world scenarios. Furthermore, at the end of every chapter, you will get hands-on practice yourself, with exercises to complete in a lab environment.

As stated earlier, if you are looking for a deep dive into relational database theory and history, many other books out there can guide you down that path. Although there are many points throughout this book where details and nuances are discussed, every chapter is driven by the goal of making you immediately effective at accomplishing actual tasks.

OK, enough about this book. Let’s start using SQL!

FAQ

What can and can’t SQL do?SQL is used to read and modify data in relational databases. It isn’t for building web or mobile apps, but it is the standard way those apps access relational data. Because nearly all major relational databases use SQL, it’s a core skill for data work.
Is learning SQL worth a month of lunches?Yes. SQL has been the industry standard for decades and remains highly relevant. The skill tends to stay valuable over an entire career, unlike many application languages that change more rapidly.
Who is this book for, and what prior experience do I need?This book is designed for beginners and non-developers as well as developers, DBAs, and data scientists. If you can work with spreadsheets and write plain English, you’re ready to start learning SQL here.
Will what I learn work with different database systems?Yes. While the book uses MySQL for examples, the concepts apply broadly to IBM DB2, MariaDB, Microsoft SQL Server, Oracle, PostgreSQL, and more. Minor differences will be called out as needed.
How should I pace myself through the book?Plan on one chapter per day. Expect about 40 minutes of reading and 20 minutes of practice. Work through chapters in order, since each builds on the previous ones.
What are the hands-on labs like?Most chapters include short, practical exercises to reinforce what you’ve learned. They’re not quizzes—answers appear at the end of each chapter—but doing them is essential for retention.
What software do I need to install?Install MySQL and MySQL Workbench. Both are free and lightweight, suitable for a typical laptop. Step-by-step instructions are available at https://github.com/desertdba/learn-SQL-in-a-month-of-lunches, and newer version numbers shouldn’t affect the steps.
How do I get the sample data used in the book?Run the provided scripts to create and populate the “sqlnovel” database. The setup steps are on the GitHub repo: https://github.com/desertdba/learn-SQL-in-a-month-of-lunches. You’ll revisit the script later to understand how it works.
Are there online resources to help with setup and troubleshooting?Yes. The author provides short videos for Windows and macOS setup, plus every SQL script from the book. Type queries yourself first and use the scripts mainly for troubleshooting.
Is a spreadsheet like Excel considered a database?Some people call it one, but this book focuses on relational databases. The question of whether a spreadsheet counts as a database is addressed in the next chapter.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Learn SQL in a Month of Lunches ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Learn SQL in a Month of Lunches ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Learn SQL in a Month of Lunches ebook for free