The future of marketing — why you can’t “just” be a marketer

Sinan Ata
4 min readJun 12, 2019

--

“As a marketer, why should I learn SQL? Isn’t it a programming skill? I’m a marketer, graduated from these schools, worked in these companies…”

Photo by Garidy Sanders on Unsplash

I’ve done hands-on marketing and executive work for global software companies for years before I build Exceptionly for revolutionizing the software talent industry through objective hands-on testing.

This mindset above is common among my colleagues, marketers today. But those qualifications won’t be enough to compete going forward. Traditional marketers are going to be history. You better start building growth hacking skills.

We’re not just living in the age of data; we’re also living in the age of higher expectations. Managers and customers are both harder to impress; they want to see better results, faster. The question is are you well equipped to embrace these expectations? In a business environment like this, can you expect to wait for the engineering department or a non-collaborative teammate to help you? Can you just wait for it for a couple of weeks? In theory, you can, but I strongly suggest you don’t. Who points fingers and says “I couldn’t do my work because I was waiting for X” to her/his boss?

Learning SQL is critical. The vast majority of the businesses have one of the SQL databases living on the back-end of their products. It’s a simple tool that all marketers can use to derive actionable insights from data.

Let’s start with a very simple data structure. Let’s say we have the following data about our customers:

A simple table with dummy data

How do you get what you need from an SQL database?

select * from customers

Would give you all the data living in the customers' table.

select id, first_name, created_at from customers

Would return only the selected fields and all rows in the customers' table.

select id as ‘ID’, first_name as ‘First Name’, created_at as ‘Customer Created At’ from customers

Would give you formatted field names as the table headers and return all the values from the customers' table.

select * from customers where is_mql = 1

Would return only the customers who are marketing qualified leads based on the binary setup for the is_mql column.

select * from customers where is_mql = 1 and country like ‘United States’

Multiple where statements would give you all the customers from the customers' table who are from the United States and also considered marketing qualified leads.

How do you count, sum, create cohort labels, and format your data in SQL?

select sum(is_mql) from customers

Would return the sum of the is_mql column (which is binary) from the customers' table, which is 4. In other words, there are 4 MQLs in the database.

select count(id) from customers

Would count all the entries in the customers' table and return the value of 6.

select count(distinct country) from customers

Would count all the unique countries and return the value of 4.

selectfirst_name as ‘First Name’,last_name as ‘Last Name’,country as ‘Country’,casewhen TIMESTAMPDIFF(DAY,created_at,now()) <= 7 then ‘Less than 7 days’when TIMESTAMPDIFF(DAY,created_at,now()) > 7 then ‘More than 7 days’end as ‘Cohorts’where is_mql = 1

Would return marketing qualified leads from your customers' table and label them with “Less than 7 days” or “More than 7 days” based on the time difference between now() and created_at date field.

How do you group data in SQL?

select country, count(id) from customers group by country

Would count ALL customers in the table and give you a breakdown per country. Would return a two-column result of United States 3, Turkey 1, Argentina 1, Canada 1.

select country, week(created_at), count(id) from customers group by country, week(created_at)

This is an example using multiple groups. This query would return the previous table with a weekly breakdown per country.

How do you sort data in SQL?

select country, count(id) from customers group by country order by count(id) desc

Would return the same as the previous table, with the rows sorted based on the count of customers in each country in descending order. You can use “asc” for ascending order.

How do you create weekly reports in SQL?

You’ll need a timestamp field for this query, in our case it is created_at

select week(created_at), count(id) from customers group by week(created_at)

Would return you the count of customers added to your database per each week number.

How to analyze this week vs trailing four weeks in SQL?

selectcountry,count(case when created_at < now() and created_at >= date_sub(now(), INTERVAL 1 WEEK) then id end) as ‘Last Week’,count(case when created_at < now() and created_at >= date_sub(now(), INTERVAL 4 WEEK) then id end)/4 as ‘T4W Average’from customers group by country

Would return you a list of countries, the number of customers recorded in the last week, and the average from the preceding four weeks. You may want to populate your table with more data in order to understand how this works. Keep experimenting.

These simple queries can help you with any SQL database with minor changes. Once you get better at SQL queries, you’ll realize life gets even easier when you have to use SQL-like query formula on Google Sheets. My method is usually building extensive raw data on SQL and then moving it to Sheets to play with.

About the writer: Founder of Exceptionly, revolutionizing the software talent industry by leveraging his unique big dataset of over 2M hands-on tested software engineers around the world.

--

--

Sinan Ata
Sinan Ata

Written by Sinan Ata

Founder at Exceptionly. Software talent problem solver https://exceptionly.com

Responses (1)