In-app messaging. Email sends. Content creation. There are so many things that we do to promote different features of our product. But after awhile, users tend to tune them out especially if they are not relevant. It can be challenging if not impossible to figure out how to re-engage your customers especially when you have a new product that would benefit them.
Using usage data from SQL or MixPanel, you can cater your messaging toward the segment of customers who are a great fit for your latest product release or your latest product marketing campaign. In this session we will walk through how to do this through developing a hypothesize, pulling usage data in SQL, and running a campaign based on this data.
About Rachel Sprung
Rachel Sprung is a Product Marketing Manager at HubSpot specializing in Reporting and Analytics. Rachel loves using SQL, Mixpanel, and all things data to make usage-driven decisions. This transcends through her work developing product positioning, launching product campaigns, and creating content. It's this data-driven approach that earned Rachel the 2014 Excellence in Innovation Award at HubSpot. Previously, she managed internal and external events including HubSpot's annual INBOUND conference. Whether you want to chat data, product, or puppies, you can find her on Twitter @RSprung.
24. WHAT IS SQL?
SQL = Structured Query Language
• SQL is the vehicle that pulls data out of the
server in a way that we can analyze it.
• SQL has no visualization capacity, but it can
output data
26. Who are the people who have
red hair in Massachusetts and
were born in 2003 organized
in alphabetical order?
27. Who are the people who have
red hair in Massachusetts and
were born in 2003 organized
in alphabetical order?
28. • SHOW DATABASES;
• SHOW TABLES in NewEngland;
• Describe people_massachusetts;
UNDERSTAND THE HIERARCHY OF YOUR DATABASE.
29. SELECT statements choose
the fields that you want
displayed in your chart
SELECT.
EXAMPLE QUERY:
SELECT
first_name,
last_name
30. * tells the query that you want
to include all of the columns
of data in your results.
*.
EXAMPLE QUERY:
SELECT
*
31. FROM pinpoints the table that
you want to pull the data from.
Tables:
people_connecticut
people_maine
people_massachusetts
people_newhampshire
people_rhodeisland
people_vermont
FROM.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
32. WHERE begins your filter.
Start with any of the fields,
and write what you want to
see.
WHERE.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
WHERE
hair_color = “red”
33. AND adds additional criteria.
AND.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
WHERE
hair_color = “red”
AND
birth_date BETWEEN ‘2003-01-01’ AND
‘2003-12-31’
34. ORDER BY sorts the fields.
ORDER BY.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
WHERE
hair_color = “red”
AND
birth_date BETWEEN ‘2003-01-01’ AND
‘2003-12-31’
ORDER BY
last_name
;
35. GROUP BY aggregates data
that has similarities.
GROUP BY.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
WHERE
hair_color = “red”
AND
birth_date BETWEEN ‘2003-01-01’ AND
‘2003-12-31’
GROUP BY
last_name
;
36. TABLE:
ORDER BY VS. GROUP BY.
ORDER BY:
GROUP BY:
ID Name
1 Peter
2 John
3 Greg
4 Peter
ID Name
3 Greg
2 John
1 Peter
4 Peter
# Name
1 Greg
1 John
2 Peter
37. LIMIT is a good way to test
queries by limiting the results
you will get from the query.
LIMIT.
EXAMPLE QUERY:
SELECT
first_name,
last_name
FROM
people_massachusetts
WHERE
hair_color = “red”
AND
birth_date BETWEEN ‘2003-01-01’ AND
‘2003-12-31’
GROUP BY
last_name
LIMIT
100
;