Doesn't suit? No problem! You can return items for up to 30 days
You won't go wrong with a gift voucher. The gift recipient can choose anything from our offer.
Up to 30 days for returns
Structured Query Language (SQL) has quietly become one of the most durable technologies in software. Languages, frameworks, and entire architectural styles have risen and fallen since it was first described the relational model in 1970, yet the language built on top of it remains, half a century later, the primary way that people ask structured questions of their data. This book exists to make that language make sense - not just its syntax, but the reasoning behind it.
Who this book is for. This book assumes no prior database experience. It is written for the developer picking up SQL for the first time, the analyst who has copied and pasted queries without fully understanding them, and the student preparing for a career that will almost certainly require this skill sooner or later. At the same time, later chapters - window functions, indexing, transactions - are written with enough depth that even readers with some SQL background will find material worth slowing down for.
How this book is organized. The six parts of this book are sequential by design. Part I begins with the relational model itself and the mechanics of creating a database; Part II covers retrieving and filtering data; Part III introduces the relationships between tables through joins and set operations; Part IV moves into aggregation, subqueries, and conditional logic; Part V covers the advanced objects - window functions, views, indexes, transactions - that separate a working knowledge of SQL from a professional one; and Part VI steps back to look at database design and where SQL fits in a data landscape that now includes NoSQL and cloud-native platforms. Readers already comfortable with the fundamentals are welcome to skip ahead, but each part does build on the vocabulary and habits established in the ones before it.
A note on the exercises. Every chapter closes with a short set of exercises grounded in a single running scenario: a fictional company called AMBS Retail Co. Rather than invent a new, unrelated dataset for every chapter, the exercises reuse and extend the same handful of tables - customers, orders, products, employees - so that by the middle of the book, the schema itself feels familiar. The full schema is reproduced in Appendix A, and a syntax quick-reference is available in Appendix B for whenever a statement's exact form slips your mind. Each exercise includes a worked solution; resist the temptation to read it before attempting the query yourself - that struggle is most of where the learning happens.
A note on SQL dialects. SQL is standardized, but no two database systems implement that standard identically. Wherever syntax diverges in a way a reader is likely to encounter - date arithmetic, recursive queries, pagination - this book calls it out explicitly, typically showing the MySQL, PostgreSQL, and SQL Server forms side by side rather than picking one dialect and leaving the reader to guess at the rest. The core logic, however - how a JOIN works, why GROUP BY behaves the way it does, what a transaction guarantees - is universal, and it is that logic this book is ultimately trying to teach.
Thank you for picking this book up. Let's begin.
Hi! I'm Libroamiko, your book advisor.
How can I help you?