Getting Started with SQL

Getting Started with SQL

There are a lot of situations where being comfortable with SQL can really go a long way. For example if you use Excel - you could use SQL and a connection to a database to query data directly into an Excel sheet. If you use Tableau you could write a query as a custom data source. Many reporting and business tools that are backed by a database will have SQL tools that you can use to directly query data from the database. If you have the ability to interact directly with your database but you don’t because you think SQL is too complex this article is for you.

There are many scenarios where using SQL can save you MANY data manipulation steps in excel. For example if you have two result sets that should be merged you can use a union to append one data set to the other, or a join to merge the two sets by matching rows based on criteria like id numbers. Having the data in the shape you want it before it hits Excel, or your reporting/BI tool can save you a lot of time and hassle.

Introductory Courses

Here are some of my favorite introductory resources in no particular order. There’s no need to go through each one completely. Just get familiar with the concepts in a couple of these resources and you’ll start to develop a general knowledge of the terrain and have a better idea of where to look next.

Free Code Camp’s SQL video course - free

Andrew Cumming’s interactive SQL coding project SQLZOO - free/ad supported

Codecademy’s interactive online coding tool - free version

Zed Shaw’s book and videos Learn SQL The Hard Way - $20

Stanford’s database courses taught by Jennifer Widom - now on edX - free

Documentation

Don’t be shy about the documentation either - make sure you know where to find database vendor documentation for your flavor of SQL. It can seem intimidating at first but once you get comfortable looking things up you’ll have a vast trove of answers available straight from the source. Don’t be afraid to skip to the examples - they can quickly help you determine if you’re on the right page.

SQLlite - great to practice with, especially along with Python.

PostgreSQL - the most popular open source database system.

MySQL for the open source MySQL Server.

T-SQL for Microsoft SQL Server.

PL/SQL for Oracle database systems.

Be sure to check back for my article on intermediate and advanced SQL resources, and Excel Power Query.

No Comments Yet