Several years ago, I made the jump from being an Washington, D.C. policy analyst to a data analyst at a San Francisco tech company. Prior to making the transition, I didn't see value in learning SQL. I analyzed data day in and day out, but found little reason to leave Excel.
Learning SQL changed my perspective on the how to analyze data. Here are five of the biggest reasons why, which I've learned apply to all sorts of people who ask questions of data:
1. No longer rely on others for access. Most of the world's data is stored in databases and can only be accessed via SQL queries. Because I didn't know SQL, I either had to depend on someone else to create a dataset I could work with or, more often, I relied on using tools that restricted how data could be accessed or queried. If my questions or analysis required looking at data from a slightly different angle, I either had to track down someone who could add something new to the tool, or I was out of luck.
2. Ask better questions. Tools that restrict access to data also restrict the types of questions you can ask. After learning SQL, the scope of the questions I could ask were limited by my analytical creativity, not by the tool that provided the data.
3. Easily combine data from multiple sources. If I was working with several large spreadsheets and wanted to combine them, I had to copy data into a shared document and write complex functions to match to the two datasets—and on large datasets, these functions would often crash my spreadsheet. SQL is designed to make this easy. By being able to easily add new data to my analysis, I could find insights that would have previously gone undiscovered.
4. Work with data of all sizes. Spreadsheets can be great for analyzing hundreds and even thousands of records. But if datasets grow to tens of thousands of rows, spreadsheets become very difficult to manage. SQL is optimized to handle datasets with millions—and even billions—of records.
5. Replicate and audit faster. At first, a SQL query looks confusing compared to an Excel spreadsheet. But once you understand the basics of SQL, spreadsheets are far more difficult to understand. Because you can't read step-by-step instructions that explain how spreadsheets calculate values (you have to examine each cell), it's very difficult proofread spreadsheets or check their accuracy. (An entire organization exists to educate people on spreadsheet risk management.) Moreover, it's nearly impossible to understand and extend someone else's work done in a spreadsheet. Extending a SQL query involves only reading a few lines of code.
SQL School: a hands-on approach to learning SQL
As I prepared for the transition to tech, I learned SQL through a variety of online guides and manuals. As I read them, I thought these tutorials were helpful—I grasped the concepts, I understood the basic syntax, and I passed through lessons quickly.
The day I started my new job, however, I realized just how little I knew. SQL, like any other language, can't be learned by reading alone—you have to answer real questions using real data. I only really learned when I had to solve problems by querying an actual database.
Unfortunately, working with real data requires access to a database with interesting data, and ideas for questions to explore. Given that these things are hard to gather on your own, it's no wonder people avoid learning SQL.
To help others learn SQL the way I did—by working with an actual database to answer questions—we created SQL School. Rather than simply describing SQL syntax and listing examples of how its used, we show you how explore questions with actual data—and in one click, provide access to database already loaded with data. Each lesson is written in plain English and doesn't assume any prior programming or statistical knowledge, teaches you how to approach data analysis, and draws from situations we've experienced as data analysts in the tech industry.
We'd love any feedback on what to add next, and how to make it better: are any of the current lessons confusing or incomplete? Are there SQL functions or operations that need more explanation? Are there techniques for manipulating or analyzing data that you'd like to use SQL for, but aren't sure how? Please let us know at email@example.com. Happy learning!
Get started at sqlschool.modeanalytics.com