SQL Tutorial Intro: My Experience with SQL
When I started at my current company, I discovered that I would need to learn Structured Query Language (SQL) for my position as a Financial Analyst. At the time, I didn’t know what SQL was or how to learn it, and the company had few internal resources available to help me. The first thing I did was buy a book: “SQL in 10 Minutes”. Name aside, it was a great resource to learn the nuts and bolts of SQL. It taught me how to write and modify basic SQL queries (query is just a technical term for a series of SQL statements) and allowed me to start playing around with the language and learning through trial and error.
While the book provided much of the technical knowledge I needed to write and modify simple queries, it did not teach me the foundational framework of the language or how it worked conceptually. This was probably due to my own shortcomings more so than the book’s, but either way, I ended up with some serious holes in my knowledge.
To use a simple analogy: imagine a home-builder explaining to an apprentice how to build a house:
“First, stack these bricks in a hollow rectangle six feet wide, four feet deep and thirty feet high.”
Perhaps a better explanation would have been:
“The plans for this house call for a fireplace and chimney. A fireplace is an enclosed area where the owner can burn wood to produce heat. The smoke from the fire rises up from the fireplace, into the chimney and out of the house. We use bricks to build them because bricks insulate heat well. We build this part of the house first because it is an essential part of the foundation.”
To continue the analogy, after a year with SQL I knew how to construct a fireplace, I just had no idea what it was for. I saw that other houses had fireplaces so I added one to mine.
Eventually, the work I was doing reached a level of complexity that required me to actually understand these concepts, and my basic skills were no longer sufficient. I hit a wall and decided to start completely over. I wrote off everything I learned before, and re-learned all of it with the proper context. It was a painful experience, but in the end I gained a much stronger understanding of the language, and it translated into better work performance.
The purpose of these articles is to ensure that readers learn those critical concepts the first time around. Specific topics will include: (1) the basic concepts of SQL, (2) the technical details necessary to write simple queries, (3) how to self-teach to higher levels of proficiency, (4) additional explanation of some tricky concepts.
Note: This series is mainly aimed at non-programmers. I will try to keep the scope narrowly focused on the concepts useful to that audience. Further, I will try to relate SQL concepts back to tools that readers are likely to have used before (mostly, Microsoft Excel).
So, let’s get started!