Saturday, January 21, 2017

How to get started learning SQL

Last August (2016) I got a new job that required me to learn SQL immediately, specifically for MS SQL Server and SAS. Initially, however, all I had access to on my work machine was MS Access. I had a host of "learn SQL quickly" books but two stood out as the absolutely most helpful, and the ones I would give to anyone learning SQL.



Learn SQL in 10 Minutes by Ben Forta (SAMS Publishing)


Head First SQL by Lynn Beighley (O'Reilly Media)

I had digital copies to read on my iPad next to my desktops. I was able to use them well enough in MS Access and and suffering through those early days made my transition to SQL Server much easier.  Both books have datasets you can download from a website, but Ben Forta's are the easiest to get going on SQL Server and he has a message board for asking questions that he actively responds to. His book is also helpful in pointing out dialectical differences across platforms. Beighley's is written for MySQL.

Forta's book is broken down such that each lesson takes you 10 minutes (at most) to type in the code on your own and read how it works.
Head First SQL is a creative exercise, you follow a sequence that takes you through a particular project (building a match-making database). I love books that take you on a step-by-step journey to completing an imaginary project. Beighley is a creative and organized woman, the book has graphics and humor whereas Forta's is no-nonsense short examples. I recommend both approaches as complementary.

Once I had access to SQL Server, the coding exercises (obviously) became much easier. Beighley's book went a little more complicated in her sets, and it's a longer book to work through. Afterwards, I went through the free SQL Server Boot Camp course on Udemy.com and got much better at my SQL coding.

I have other books I've used in learning and practicing, particularly ones that integrate data analysis using SQL and Excel or SAS, but the best way I can recommend starting is to download these two books and get to work. You can do anything for 10 minutes.

No comments: