**UPDATED AS OF NOVEMBER 2015 - JOIN 9,000+ SUCCESSFUL STUDENTS!**
Become a technical marketer with this course on using SQL for data analysis. You'll learn:
Technical marketers are in high demand and low supply. Being able to dive into data on your own, with no help from engineering, makes you a much better marketer.
This is why SQL is so powerful - it allows you to see any data you want about anything your customers do. Knowing how to use SQL is literally a marketing superpower.
As someone who can understand and use SQL, you'll be a (highly paid) marketing unicorn - able to dig into data and also execute high-level marketing campaigns. Many companies - including Udemy! - are now requiring that their marketing leaders have an understanding of SQL.
Many marketers have tried to become "technical" - including me - but have failed over and over again after coming across resources meant only for engineers. I know I've had this issue - every SQL tutorial out there was created for developers, not marketers. Other tutorials include topics like creating a database, inserting data, managing tables, and other specifics that database administrators need to know.
What if I told you that marketers only need to know a small amount of SQL to use it for analytics... and to run more profitable campaigns?
Good news - This is the truth!
This course is the best resource for marketers, growth hackers and product managers who want to get more technical and learn SQL. It's what I wish existed when I was going through tutorial after tutorial, sifting through lots of information that didn't apply to me and trying to learn on my own.
And - best of all - you don't need to know programming or be technical to take this course. In fact, you don't have to be technical to know how to use SQL!
SQL is simple enough that - just by learning a few concepts I'll cover in this course - you'll be able to use it for any kind of data analysis, cohort analysis or campaign breakdown.
Everything I've put into this course are the product of years of teaching myself to program, understanding software technology and writing thousands of SQL queries for my own marketing and growth campaigns. The concepts and queries in this course are used every day by the marketing teams at companies like eBay, Moz, Udemy, HubSpot... you name it.
I've used my knowledge of SQL to cut churn by more than 60% while running growth at developer-tools startup Airbrake (acquired by Rackspace), and to analyze and improve multiple profitable marketing campaigns. Knowing SQL has given me incredible insight into our customer base, and allowed our marketing team to move much faster than we did when we had to wait for engineering to give us the data we requested.
But don't just listen to me. Here's what a few other people have said:
"About four weeks back, I learned SQL, and it's been one of the greatest skills I could have ever acquired as a marketing / business guy at a startup."
- Dinesh Thiru, Head of Marketing at Udemy
"I loved this course. I was able to power through it within 3 hours and have a solid base of understanding for SQL.
As a digital marketer, it's important that I have access to my database and customer information BUT that I do not waste valuable developer resources. This course aims to bridge that gap by teaching you the tools you need to query your SQL database and running your own reports.
I can't recommend this course enough for SQL newbies. I now have a base of understanding of SQL and excited to use it at work this week!"
- Benjamin Hoffman, course student
Some things you'll learn in this course:
Trust me, this is just a small sample of what you'll learn. By the end of this course you'll be more technical than 90% of marketers out there, and 100% better at your job.
I'll also personally respond to any questions you may have as you go through the material, so there's no worry if you think this might be too technical or too confusing. I've included only the essentials marketers need to know, and created the course I wish I had years ago when I was learning this stuff.
As a last bonus, I'll personally guarantee your satisfaction. If for any reason you don't think the course was valuable, I'll personally refund your entire purchase amount, no questions asked.
See you inside,
P.S. If you have (or are looking) to become a better marketer, investing a few dollars in yourself will be the best investment you ever make. And, if you don't like the course, I'll give you a 100% refund - my guarantee.
SQL allows you to answer common questions marketers and product managers have about their customers:
And so on. Try to think - what do you wish you knew more about your business? Then use SQL to answer those questions.
Before moving on to the next stage of the course, take 2 minutes to do the following:
In this lecture, we'll cover what SQL is, why it's powerful, and why it's so important to understand it as a marketer.
If you're confused (or even curious) about the kinds of things you can do with SQL, this will be a great lecture to watch. Otherwise, if you already have a strong understanding of what SQL is and how it works, feel free to skip to Lecture 5!
I want you to have a big win by the end of this course. First, decide what key metric you’d like to learn more about or improve in your business. Maybe it’s seeing who your best customers are, learning where most of your new signups are coming from, or decreasing your churn. Decide what metric you want to learn more about with SQL, and then do the above steps.
Let’s take a second and have you do 2 things to get the most from this course.
1. Email your developer and ask him or her to give you read-only access to your database, or to set up a ‘slave’ server that you can run queries against.
2. Ask your developer to show you quickly how to run queries against this database. You’re likely using Heroku Dataclips, phpMyAdmin or some other relatively standard database management tool. Be sure to ask if you’re using SQLite3, PostgreSQL, MySQL or some other type of SQL engine.
Really. Take 5 minutes to have someone on your team set this up for you. If you’re on your own, check out the links in the resources on how to set up Heroku Dataclips or phpMyAdmin, two of the more popular solutions out there.
Challenge time! Use the select and where statements to answer the challenge question.
This lecture answers the challenge question posted in Lecture 10. Try to watch that lecture (and get your own answer) before going through this one!
Join — This command temporarily joins two tables we’d like to search, so that we can pull data from multiple queries. “Join” tells SQL which table we’d like to join, and the “on” modifier tells SQL which columns in those tables should map to each other.
Where— This statement tells SQL how to access the right data. In this case, we’re telling it to show us users who have gotten errors in production AND who have signed up within a certain time period.
Group by – This statement tells SQL how to group your data when it returns the query result. In this case, data will be grouped by name in the ‘users’ table. Think of this as a massive sort function in Excel.
Order by – This statement tells SQL how to order your data. This can be useful when pulling massive amounts of information from the database.
Limit – This tells SQL how much data to return. In our case, we’ll only receive the first 15 results that fit the results of this query.
Use this information to write your queries. Remember, you have to name the tables and columns you want to pull data from.
Show – displays all databases or tables (depending on your selection)
Use – tells SQL which database you want to use to run queries on
Describe – describes column data
This lecture covers how to sort and/or limit data that's returned from a SQL query you craft.
Sorting and limiting data is incredibly useful for when you return a large amount of data that's impractical to sort through on your own. With these statements, SQL allows you to sort and limit the data it's going to return, which makes large data sets far easier to work with.
This lecture covers how to use functions in SQL. Specifically, we cover the count function, which allows you to return unique values for any SQL query you're writing.
This quiz will test how well you understand how a SQL statement is structured.
This lecture shows you how to set up SQL if you haven't yet.
If you're still having trouble getting SQL set up, check out some of the guides we linked to in the resources, or ask a question in the discussion forum!
Go through the text lecture and make sure you have World.sql setup and running properly on your machine!
In this lecture, we cover how to navigate and extract data from a test database (the World.sql database you should have set up from the last lecture).
The basic querying and setup skills we cover in this lecture are critical to effectively using SQL on your own on a regular basis.
For this part, we're going to show you how to construct some basic SQL queries using the test SQL database from W3 school. Though these examples will be more fitting for an ecommerce store, you should get a good idea of how to construct these queries by scratch, and you'll be able to see the output they generate.
In real life, you'll be able to query your database for whatever parameters you want, then dump that data into an Excel or other spreadsheet for easy, non-programattic analysis.
First, let's look at how you can find out how many orders each customer placed. Write a query that shows the number of orders a customer has placed.
One student, Theodor, also has posted an alternative answer in the discussion group, for those of you interested:
o.customerid as "Customer ID", c.customername as "Customer Name", count(o.customerid) as "Number of Orders"
orders o, customers c
o.customerid = c.customerid
group by 1
count(o.customerid) > 1
order by 3 desc
Take a look at the results in your browser. Were you able to see a list of customer names, customer IDs, and a count of how many orders they placed? If you wanted to, you could download this data into a spreadsheet for more analysis.
Think how you could apply this in your business:
One student also discovered an alternative solution, found below:
select countrylanguage.language, country.code, sum(country.population*countrylanguage.percentage/100)
join country on countrylanguage.countrycode = country.code
group by countrylanguage.language
order by sum(country.population*countrylanguage.percentage) desc
SQL is especially useful for cohort analysis. A cohort analysis is a method of analyzing a metric by comparing its behavior between different groups – also known as cohorts – of users. These are generally based on the dates that a user started using a service or application.
This kind of data allows you to see if you’re attracting users with higher LTVs, measure the efficacy of marketing campaigns over time, and see how retention compares between different cohorts
In this case, we’re looking at all users who generated an error in the month of March, 2014. Then, we can compare this to other groups of users from previous months to see if new users are sending more errors (aka using the product more)
You can script queries so they’ll run automatically at certain times each month.
Another thing you can do – which I’ve done with a consulting client – is look and see if they’ve done a key metric by the end of the week. Let’s say you run Udemy and want to see if a new customer has taken a course within the first week they’ve signed up. You can easily create a SQL script to pull customer’s emails who have created a Udemy account but haven’t taken a course yet and email them a coupon for 50% off their first course. Running data-driven marketing campaigns like these has a larger impact than just about any other campaign you could run.
Lastly, reporting. Often, it’s easier to pull relevant data from SQL and put it into Excel or Google Docs for analysis, charts and reporting. With a simple script (you’ll probably need 10 minutes of a developer’s time to do this), you can write a query and have it automatically email you data you care about at the end of every week or month. You can then plug this into any metrics dashboards or spreadsheets you use to report on your marketing.
If you ever have to work with an unfamiliar database, this lecture will show you some very simple ways to figure out the column and table names used in that database.
I highly recommend watching this lecture before writing any queries on a production database, as if you use the wrong column or table name you could accidentally return the wrong data... which will then defeat the entire purpose of learning SQL in the first place :)
This method of finding table and column names works for any sort of database or software tool you (or your company) use to write SQL queries.
So that's it! What did you think of the course? Are there any areas you'd like me to expand on?
If so, please leave a comment in the course discussion area. And, if you'd be so kind, I'd love it if you left a review telling me what you thought of the course.
Enjoy your new SQL knowledge!
Hi! My name is Justin Mares. I formerly ran growth at developer tools company Exceptional (acquired by Rackspace in March of 2013).
While there, I taught myself how to become a technical marketer and use tools like SQL to run important analyses on our customer data. Along with learning the basics of HTML, CSS and Python, I've found learning to become a more technical marketer has been one of the most valuable investments in myself I've ever made.
In addition, I'm the co-author of Traction Book, a book about how startups can get traction. For the book, we interviewed Jimmy Wales (founder of Wikipedia), Paul English (founder of Kayak), Dharmesh Shah (HubSpot founder) and pulled together an actionable framework for how startups should think about getting traction and distribution.
I also founded an ecommerce company, Kettle & Fire, that's on a multi-million dollar run rate in just a few months.