Learn SQL in a Spreadsheet

This piece outlines why I built Learn SQL in a Spreadsheet, a free course on the basics of SQL for non-technical folks. You can grab your copy of the sheet at the bottom of the post.

On the first day of my first job, I knew nothing about programming.

I sat down at my desk, and the first two windows I was instructed to open were a terminal and a query browser.

WTF?  I thought this was finance?

I felt like a kindergartner who forgot to wear pants to the first day of school.

But within a few weeks, I was writing SQL queries and having fun doing it.

And now that I’m working as a growth marketer, I thank my lucky star every day that I learned SQL at my first job.

Why I heart SQL

In many ways, your company’s data is your company.  Understanding it allows you to understand your company’s successes, failures, and future possibilities.

Working in a non-technical role, knowing SQL makes you the linchpin of your team – you’re the sorcerer with the keys to the kingdom of data. You can do a few critical jobs that others simply can’t:

  • Set KPIs: what metrics are important for the business, and how can we measure them?
  • Cohort analysis: what are customers who signed up from ________ source or time period doing?
  • Explore feature adoption: who’s using that new _______ feature we just rolled out, and who isn’t?
  • Create (actual) data-driven campaigns: who should we be targeting for  _______ campaign in a custom audience, based on customer activity?
  • Enrich your data: my favorite enrichment tactic is using the Blockspring + the FullContact API to find social accounts from customer emails.

Knowing SQL allows you to explore the raw materials you have to work with, making every day like that scene in Apollo 13:

And it’s actually surprisingly simple to learn (so simple that you can learn it in a spreadsheet), because you really only have to understand two concepts: databases and queries.

But WTF is a database?

Databases are little houses that we store data in.

Every photo you’ve ever uploaded to Instagram, or check-in you’ve made on Foursquare, is stored in a database.

In a house, each room contains different furniture and serves a specific purpose.

In a database, each room is called a table – for example, posts in Instagram are stored in one table, with a consistent data structure. We can reliably pull data from these tables over and over using the same queries.

And WTF is a query?

If a database is a claw crane game full of unicorn stuffed animals, querying is like pointing the joystick and hitting the big red button.

You type a line of code, hit ‘go’, and some data comes out (or fails to come out). It’s actually surprisingly fun, even when you get it wrong.

Queries can be read like English.

Say we want to pull all of your posts from Instagram. That query would look something like:

SELECT user_id, photo_url FROM posts WHERE user_id = ‘you’

All this means in English:

Let’s pull the user ID and photo URL, for all of the posts, where the user is equal to you.

Simple enough right?

Build your SQL superpower

If you had to pick one technical skill to learn, that would boost your capabilities and (ultimately) your salary at work, I would choose SQL every time.

I believe this so strongly, that I put together a free course, which teaches the basics of SQL in an interface you probably already know – the humble Google Spreadsheet.

It’ll take you no more than a week to complete, and by the end of the course you’ll be able to write basic queries, perform math in SQL, and pull data together from multiple tables.

So dive in below!

If you have any doubts about learning SQL, I’d be curious to hear them – feel free to drop a note to commissioner@codingisforlosers.com. Many thanks to the good people at Blockspring for sponsoring a free account to accompany the course.