How It Started

Why Did I Want to Learn SQL?

If I had to trace the reason back, it was probably my year working as an IQVIA SAS programmer. Whenever I encountered PROC SQL syntax, I felt deeply unsure of myself and had to compare it line by line with a senior colleague’s code just to understand what it was doing. It was honestly exhausting.

PROC SQL follows the same overall syntax and structure as SQL, so I decided that instead of beginning with PROC SQL inside SAS, I would start with SQL itself and build a firmer foundation.

SQL is useful far beyond SAS. It is used to retrieve data from databases in many settings and is also one of the important languages used in data science, so learning it from the beginning seemed worthwhile in several ways.

Because I plan to continue moving toward data management and data science, I chose SQL as my first subject during the break between jobs: it could strengthen both my data-science skills and my SAS programming.

Why Did I Choose This Book?

My learning habits mattered too. I was working on a new business and wanted to read and learn many other things at the same time, so I could not spend too long studying a single subject.

There are plenty of free SQL resources online, but I did not yet have a coherent knowledge structure. I wanted to follow a ‘one-book approach’ and quickly build a complete map of SQL.

Even better, I hoped the material would begin with installing the software needed for practice.

Since SQL is a language for retrieving data from databases, I also wanted a resource that supplied databases on which I could practise the syntax.

After all, repeated programming is the most important part of learning to code: that is how you discover a way of thinking that works for you.

Many free tutorials are detailed, but their structure can feel incomplete, and they do not always provide a database for practice.

This time, then, I decided to focus on paid resources.

The first course I found online was Hahow’s Fifty SQL Exercises: A Beginner-Friendly Introduction to Databases.

I had already planned to buy the course. Then, while browsing a bookstore for my own Christmas present, I unexpectedly found a book with the same title.

I flipped through it, liked what I saw, and noticed that it was not too thick. It looked like a book that could get me started with SQL fairly quickly, so that was the one I chose!

The other two books I bought as Christmas presents, covering skills I planned to learn during the job transition.
The other two books I bought as Christmas presents, covering skills I planned to learn during the job transition.

About the Book

The cover of Fifty SQL Exercises; image source: online retailers.
The cover of Fifty SQL Exercises; image source: online retailers.

Since this is a book review, I will focus on whether the book helps people learn SQL and which features make it effective for beginners.

Online retailers provide sample pages, so you can preview a few and see whether the style suits you.

Readable Layout and Plain Language

Compared with denser programming-note series such as Head First, Fifty SQL Exercises does not make its pages feel crowded.

Code and explanatory text are clearly separated, with code displayed in dark-grey blocks and a different typeface.

When SQL statements appear within an explanation, they are also set in a different typeface.

That makes the book highly readable for a beginner and easy to continue through at a steady pace.

The writing also seems designed for readers with little or no background in other programming languages. It stays plain and approachable instead of becoming stiff or overloaded with specialist terms.

A Clear, Logical Structure

One of the worst ways to begin learning a programming language is to be dropped into unexplained code—or rushed into ‘Hello, world’ simply to create an instant sense of achievement.

This book begins by explaining what SQL is, how SQL statements are structured, and what the main terms mean.

Chapter 2 then shows you how to set up an environment for writing SQL, so you do not need to search for a separate practice platform.

From there, the book progresses from databases and tables through conditional filtering and functions, then onward to subqueries and horizontal and vertical table combinations.

The sequence never feels like a leap in logic. Later ideas clearly connect with and build upon earlier ones.

Before I knew it, I had finished the book without much pain at all.

The book does include a ‘Hello, world’ moment, of course—XD—but only after introducing the basic SQL concepts and setting up the environment.

Real Databases and Plenty of Exercises

The title promises ‘50 Exercises’ (laughs), but the book actually contains 59 assignments.

That count does not include the worked examples used while concepts are being explained.

My favourite feature is exactly this: the book explains concepts with many examples and supplies matching databases for extensive practice.

Because SQL is a language for querying databases, the worst outcome is learning a concept or statement and then having nowhere to practise it immediately.

The book provides four different databases from the beginning, each containing different tables, so readers are not left searching for real data after learning the syntax.

Concrete output is what truly tests whether you have understood what you read, and this book places relevant exercises at the end of every chapter.

The early exercises are straightforward and can usually be solved with a single SQL statement, so the assignments go quickly.

Later exercises gradually require everything learned before as well as the newest material.

For example, exercises on horizontal and vertical table combinations also require conditional filtering and functions.

The problem design therefore lets you feel the difficulty of the tasks you can handle increasing step by step.

Naturally, they also take longer—XD. The final integrated exercises in Chapter 13 included more than ten questions, and I spent an entire afternoon completing them…

Once I finished, however, I genuinely felt that both my SQL understanding and my way of thinking had improved a great deal.

And if you truly cannot work out an answer, there is no need to be discouraged: the back of the book includes a reference solution—in other words, a full explanation—for every question.

A Matching Online Course Is Also Available

As I mentioned at the beginning, Hahow offers a matching online course. If the book still feels difficult after a few chapters, you can consider using the course alongside it.

Buying the book also came with a discount code for the corresponding course, which I thought was a good deal.

Overall, I found Fifty SQL Exercises to be just the right length, clearly written, and packed with practice. It is a very beginner-friendly introduction to SQL.

For readers who want to deepen an existing SQL skill set, however, it may be too elementary. In that case, the author also offers another Hahow course that can be used as a next step.

How I Learned SQL from the Ground Up

My main specialities are front-end languages such as HTML and CSS, but I had also studied SAS for years and already knew some Python and JavaScript, so programming languages were not entirely new to me.

I had also built a basic familiarity with PROC SQL at work. While studying SQL this time, I often found myself thinking, ‘Oh—so that is why it works like this.’

When I first learned PROC SQL, I often wondered why its structure looked the way it did. Because I did not understand SQL itself well enough, I could not vary or apply the code much further.

While working through this book, I created digital notes as I read.

You might think that reading the book once is enough and that taking notes is unnecessary.

After finishing a book, though, I may never open it a second time. I sometimes even donate books simply to clear space at home for more of them.

I still occasionally need to find something I once read. Keeping only the physical book makes that inconvenient, so I record what I learn in a digital file whenever I read a book.

Later, I can quickly search those notes on a phone or computer.

My own SQL notes.
My own SQL notes.

For code used to explain a concept, I also opened the databases supplied with the book, practised the examples, and modified them to see what changed.

When necessary, I added online resources to support the learning process.

I completed the exercises at the end of every chapter as well, checking that my final query results matched the answers so I would not miss anything.

The exercise that took me the longest: combining 2020 election data to calculate both parties’ vote shares in one query result.
The exercise that took me the longest: combining 2020 election data to calculate both parties’ vote shares in one query result.

The exercise shown above took me the longest, but it was also the one most closely connected to real life—XDDD.

If you study all the concepts and seriously complete every exercise, the book gives you a solid SQL foundation. Unless you want to move into more advanced material, you probably do not need another introductory resource.

Conclusion

While learning SQL, I often caught myself importing the way SAS works and thinking, ‘Couldn’t I just add another variable here?’

The clearest example came when an exercise required combining different tables and adding labels. I thought, ‘Wouldn’t transpose solve this?’ Then I discovered that pivoting data in SQL is not quite so simple…

It reminded me of something my former Japanese teacher often said: ‘That is the original sin—tsumi—of learning something new. Existing knowledge helps you learn faster, but it can also trap your perspective inside what you already know.’

SQL was relatively approachable, and I already had some background, so the whole process did not take very long—about two weeks in my case.

When I returned to PROC SQL code I had written in SAS, I experienced a genuine moment of clarity: I finally understood what it was doing and could apply it more flexibly.

This was also the first book review on the Wakame blog. Strictly speaking, though, it is not purely a review; it is closer to a record of how I began learning SQL and the methods I used.

I arranged a great deal of further study for myself during this job transition. I will gradually share the books and courses I work through, in case they can help someone else too : ).

See you in the next article!