This is a guest post from Tomi Mester of data36.com
Back in 2011, during my college years, I got my first-ever job (an internship) at a cool IT startup. I got to do all kinds of interesting tasks but mostly it was data analysis.
The process was simple:
- I received data from the developers in .csv format
- I imported it into Excel
- I crunched the data there
- I sent the beautiful charts to my manager
We learned a lot about user behaviour, trends, and how we reached (or didn’t reach) our goals. I loved it – except for one thing: I always had to wait days (sometimes weeks) for the developers to export the data for me from the company’s SQL database.
That was my #1 reason to learn SQL!
I did so. And ever since then I’ve been a huge fan of this simple and elegant data language.
Because knowing SQL allowed me to do better, more detailed data analyses – more easily and faster. And I strongly believe that it can be extremely useful for everyone else who works in data analytics and who uses different spreadsheet tools in their day-to-day job.
In this article, I’ll give you 6 reasons why you should learn SQL too!
What is SQL?
If you’ve never heard of SQL, here’s a short intro.
SQL stands for “Structured Query Language” – but I like to call it “Excel on steroids.” It describes its advantages really well.
Here’s the same dataset in Excel (left) and in SQL (right).
As you can see, they are pretty similar.
It’s the same 2-dimensional spreadsheet logic — with two big differences:
1) Performance. If you routinely use Excel or Google Sheets, you know that it can sometimes keel over faced with 100,000+ row datasets. SQL easily handles even 10,000,000 rows.
2) How you access your data. SQL is powerful but there is a trade-off. You have to give up on the user-friendly point-and-click user interface of Excel — and you have to learn how to write SQL queries. (It’s not too difficult, by the way.)
Let’s see the same SUM function in Excel and in SQL:
See? SQL is indeed pretty similar to Excel.
Here are my 6 reasons why you should learn it, too!
#1 You will access more data, faster
Just think about my story at the beginning of this article. Once I learned SQL, I got access to ten times more company data than before. Why? Because instead of asking favors from developers to pull this or that SQL table for me, I was able to play around and discover every datatable we had.
Every time I came up with an analytics idea, I was able to query the relevant data instantly. I didn’t have to wait for gatekeepers and I became 100% autonomous.
Note: I guess this was when developers started to like me (or at least hate me less :-)).
#2 SQL is the standard
SQL has been around for more than 30 years now. And it will stay for another 30 for sure. If you learn it today, you will learn a language that will serve you for good.
Additionally, since it’s 30 years old, it’s not only a widely-used language but also a mature one – and that’s one of the reasons why 99% of IT companies are – and will be – using it.
#3 You will be able to handle a million rows of data
SQL performs great with bigger datasets. 1 million lines? 10 million lines? 100 million lines? It’s not a problem. But that’s just the beginning.
In fact, SQL’s biggest power comes to light when you have to work with two or more datatables. In many spreadsheets, it can be a hassle to merge two tables. In SQL, it can be done with a few lines of code — and usually the computing time is not more than few seconds.
#4 SQL is the underlying logic behind data visualization tools like Google Data Studio or Tableau
Most data visualization tools use SQL under the hood.
So learning SQL will help you better understand what happens in the background when you create a report in Google Data Studio, for instance. That seems like a nuance, but that extra knowledge can become handy when a report is broken – or not working the way you would expect it to.
But there is more!
Almost every data viz tool has an advanced feature called custom query.
For example, there is one in Google Data Studio. Before you connect your SQL database to your Data Studio project, you have two options: you can connect the table as it is, or you can apply a custom query to it first. If you choose the custom query option, you can transform your data very flexibly and in a more advanced way than you would be able to do in Google Data Studio.
(Note: the same goes for Tableau, Chart.io, GoodData and practically every other data viz tool.)
#5 SQL looks nice on your CV (résumé)
SQL is a high-demand skill! In every industry in which spreadsheet tools are used on a daily basis (e.g. digital marketing, finance, accounting, business analytics, etc.), having SQL on your CV can be an outstanding extra.
In these fields business skills are a given but until recently, technical skills were the domain of developers. The consequence: right now, it’s really difficult to find great talent with great business sense and with SQL skills.
If you know SQL, you will stand out from the other applicants: you will have a higher chance of getting hired and you will be able to negotiate a better salary.
So learning SQL is also an investment in your career.
#6 SQL is easy (and thus it’s your best first step towards data science)
Back in my junior years, I learned the basics of SQL in 2 days – without any initial coding knowledge.
It wasn’t because I was especially talented. It was because SQL is easy to learn. To start applying SQL in your day-to-day work, all you have to learn are 10-15 specific keywords and a few simple syntax rules.
Note: Of course, like everything else, SQL gets tricky when you start to combine these simple rules. But with a little bit of practice you can master the basics of SQL. After that, developing your skills further will take nothing more than keeping at SQL and solving more and more advanced problems on the job.
If you go deeper into coding, you will be able automate things, you will be able to develop your own side projects, and in the long term, you will also be able to run machine learning and predictive analytics projects.
So it’s all very exciting!
Good resources to start with SQL (for free):
Learning SQL can be done efficiently. And it should not be expensive either. You can find many resources around the internet.
For your convenience, I’ve listed four free online SQL tutorials:
- Codecademy — Codecademy is a great interactive programming school. It’s not only for SQL – it lists many other languages. It’s just perfect for testing the waters and writing your first lines of code.
- SQL for Data analysis tutorial series — Disclosure: this is my article series about SQL. In these articles I focus on the parts of SQL related to data analytics. My main goal with this series was to make an easy-to-understand, practical tutorial for non-technical people that guides you through SQL from zero to intermediate level.
- Datacamp — Like Codecademy, Datacamp is an interactive learning platform – but it’s data analytics focused. It also has some great free introductory SQL courses.
- SQLzoo — Possibly the oldest (maybe the first ever) SQL tutorial on the internet. It’s also interactive and it guides you through the basics of SQL.
I hope that this article gave you a motivation boost to start learning SQL!
I believe it’s a really profitable investment of your time – that pays off even in the short term. If you have any questions, do not hesitate to share them with me in the comments below.
Otherwise just go ahead and start learning SQL!
Tomi Mester is a data analyst and the author of the Data36 blog. He also provides entry-level workshops and online courses on Python, SQL and data science. Tomi is an O’Reilly author and has presented at TEDxYouth, Barcelona E-commerce Summit and Stockholm Analytics.
See more of Tomi’s work at data36.com