Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SQL Tutorial for Marketers

12,515 views

Published on

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.

In this SQL tutorial specifically for marketers, I've pulled together SQL query basics that any marketer or data analyst will need to dig into their customer analytics. 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.

SQL is simple enough that - just by learning a few concepts I cover above - you'll be able to use it for any kind of data analysis, cohort analysis or campaign breakdown.

Want more information? Check out resources on my blog - http://justinmares.com/sql

Published in: Data & Analytics, Technology
  • URGENT LOVE-SPELL TO GET YOUR EX BOYFRIEND/GIRLFRIEND BACK FAST!! I’m so excited! Thanks to Dr.Unity for bringing back my Ex-husband and brought great joy to me today! Unityspelltemple@gmail.com is certainly the best spell caster online,if you need your Ex lover back fast!and his result is 100% guarantee.. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he would come back to me, I was really upset and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a (Love spell) for me. 28 hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity real and powerful spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your Ex back or your husband moved to another woman, do not cry anymore, contact this powerful spell caster now. Here’s his contact: Email him at: Unityspelltemple@gmail.com , you can also call him or add him on Whats-app: +2348071622464 , you can also visit his website: https://unityspelltempe.blogspot.com .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • URGENT LOVE-SPELL TO GET YOUR EX BOYFRIEND/GIRLFRIEND BACK FAST!! I’m so excited! Thanks to Dr.Unity for bringing back my Ex-husband and brought great joy to me today! Unityspelltemple@gmail.com is certainly the best spell caster online,if you need your Ex lover back fast!and his result is 100% guarantee.. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he would come back to me, I was really upset and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a (Love spell) for me. 28 hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity real and powerful spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your Ex back or your husband moved to another woman, do not cry anymore, contact this powerful spell caster now. Here’s his contact: Email him at: Unityspelltemple@gmail.com , you can also call him or add him on Whats-app: +2348071622464 , you can also visit his website: https://unityspelltempe.blogspot.com .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • How I Got My Ex Husband Back........... I am Shannon by name. Greetings to every one that is reading this testimony. I have been rejected by my husband after three(3) years of marriage just because another woman had a spell on him and he left me and the kid to suffer. one day when i was reading through the web, i saw a post on how this spell caster on this address Makospelltemple@yahoo.com , have help a woman to get back her husband and i gave him a reply to his address and he told me that a woman had a spell on my husband and he told me that he will help me and after 2 days that i will have my husband back. i believed him and today i am glad to let you all know that this spell caster have the power to bring lovers back. because i am now happy with my husband. Thanks for Dr.Mako. His email: Makospelltemple@yahoo.com OR.His WhatsApp Number:+2347054263874.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • URGENT LOVE-SPELL TO GET YOUR EX BOYFRIEND/GIRLFRIEND BACK FAST!! I’m so excited! Thanks to Dr.Unity for bringing back my Ex-husband and brought great joy to me today! Unityspelltemple@gmail.com is certainly the best spell caster online,if you need your Ex lover back fast!and his result is 100% guarantee.. After 12years of marriage, me and my husband has been into one quarrel or the other until he finally left me and moved to California to be with another woman. I felt my life was over and my kids thought they would never see their father again. i tried to be strong just for the kids but i could not control the pains that torments my heart, my heart was filled with sorrows and pains because i was really in love with my husband. Every day and night i think of him and always wish he would come back to me, I was really upset and i needed help, so i searched for help online and I came across a website that suggested that Dr Unity can help get ex back fast. So, I felt I should give him a try. I contacted him and he told me what to do and i did it then he did a (Love spell) for me. 28 hours later, my husband really called me and told me that he miss me and the kids so much, So Amazing!! So that was how he came back that same day,with lots of love and joy,and he apologized for his mistake,and for the pain he caused me and the kids. Then from that day,our Marriage was now stronger than how it were before, All thanks to Dr Unity. he is so powerful and i decided to share my story on the internet that Dr.Unity real and powerful spell caster who i will always pray to live long to help his children in the time of trouble, if you are here and you need your Ex back or your husband moved to another woman, do not cry anymore, contact this powerful spell caster now. Here’s his contact: Email him at: Unityspelltemple@gmail.com , you can also call him or add him on Whats-app: +2348071622464 , you can also visit his website: https://unityspelltempe.blogspot.com .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • More than 5000 IT Certified ( SAP,Oracle,Mainframe,Microsoft and IBM Technologies etc...)Consultants registered. Register for IT courses at http://www.todaycourses.com Most of our companies will help you in processing H1B Visa, Work Permit and Job Placements
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

SQL Tutorial for Marketers

  1. 1. SQL for Marketers and Growth Hackers Everything you need to know about using SQL for analytics, marketing and growth hacking
  2. 2. What is SQL? SQL is simply a language that makes it easy to pull data from your application‘s database.
  3. 3. What can you do with SQL? Answer questions!
  4. 4. Life without SQL Without SQL…. • You annoy technical people on your team • Hack together rough approximations for hours
  5. 5. Life with SQL “Starting in 2013, after the CMO realizes that he/she does not have the skill sets in place for data analytics proficiency, 50% of new marketing hires will have technical backgrounds.” - quote from IDC research of CMOs
  6. 6. Why is SQL important to me? SQL will help you see, understand and improve your company‘s metrics.
  7. 7. Why is SQL important to me? SQL will help you see, understand and improve your company‘s metrics. It allows you to access data other analytics tools cannot (Kissmetrics, Mixpanel, Google Analytics, etc.)
  8. 8. Do you know the answers to some very basic questions about your business? Take a Minute
  9. 9. Do you know the answers to some very basic questions about your business? – Are you getting more customers or less this month compared to previous? Take a Minute
  10. 10. Do you know the answers to some very basic questions about your business? – Are you getting more customers or less this month compared to previous? – What percentage of customers are active every week on your platform? Take a Minute
  11. 11. Do you know the answers to some very basic questions about your business? – Are you getting more customers or less this month compared to previous? – What percentage of customers are active every week on your platform? – How many users leave each week (churn)? Is this trending up or down? Take a Minute
  12. 12. Do you know the answers to some very basic questions about your business? – Are you getting more customers or less this month compared to previous? – What percentage of customers are active every week on your platform? – How many users leave each week (churn)? Is this trending up or down? – Who are your 100 most active users? Who are your 100 most valuable customers? Take a Minute
  13. 13. What can you do with SQL? • Make data-driven decisions • Run profitable campaigns using data • Understand every metric in your business • Get superpowers
  14. 14. How we improved churn with the help of SQL
  15. 15. Early Win for You! Let‘s take a second and have you do 2 things to get the most from this course: 1. Get read-only access to your database
  16. 16. Early Win for You! Let‘s take a second and have you do 2 things to get the most from this course: 1. Get read-only access to your database 2. Ask someone technical how to run queries against this database
  17. 17. A WORD OF CAUTION Only run queries on a read-only or “slave” database
  18. 18. How SQL Works A database works a lot like an Excel spreadsheet. It will contain multiple tables – all with unique names, like ―Customers‖ – with each table containing rows and columns
  19. 19. Why SQL is Better than Excel • Auto-updating information • Easier to query • Can visualize data automatically
  20. 20. Example Query *See how this query works by checking out the example database I pulled together at - http://bitly.com/udemysql
  21. 21. Example Query *See how this query works by checking out the example database I pulled together at - http://bitly.com/udemysql
  22. 22. SQL Queries Select — This command tells SQL what data you want to see. This data needs to be a part of the table you‘re accessing.
  23. 23. SQL Queries From — this command tells SQL where to pull the data from. What‘s the name of the table you‘re using to capture data? Put that after the ―from‖ statement.
  24. 24. SQL Queries 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.
  25. 25. SQL Queries 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.
  26. 26. SQL Queries 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.
  27. 27. SQL Queries Order by – This statement tells SQL how to order your data. This can be useful when pulling massive amounts of information from the database.
  28. 28. SQL Queries 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.
  29. 29. SQL Queries Functions • Avg() – returns the average value
  30. 30. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows
  31. 31. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows • First() – returns the first value of a column or row
  32. 32. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows • First() – returns the first value of a column or row • Last() – returns the last value
  33. 33. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows • First() – returns the first value of a column or row • Last() – returns the last value • Max() – returns the largest value
  34. 34. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows • First() – returns the first value of a column or row • Last() – returns the last value • Max() – returns the largest value • Min() – returns the smallest value
  35. 35. SQL Queries Functions • Avg() – returns the average value • Count() – returns the number of rows • First() – returns the first value of a column or row • Last() – returns the last value • Max() – returns the largest value • Min() – returns the smallest value • Sum() – returns the sum
  36. 36. You know SQL!
  37. 37. Where to Write Queries? Depends on your stack:
  38. 38. Where to Write Queries? Depends on your stack: • phpMyAdmin
  39. 39. Where to Write Queries? Depends on your stack: • phpMyAdmin • Heroku Postgres Dataclips
  40. 40. Where to Write Queries? Depends on your stack: • phpMyAdmin • Heroku Postgres Dataclips
  41. 41. Where to Write Queries? Depends on your stack: • phpMyAdmin • Heroku Postgres Dataclips • Eclipse SQL Explorer
  42. 42. Where to Write Queries? Depends on your stack: • phpMyAdmin • Heroku Postgres Dataclips • Eclipse SQL Explorer • SQuirreL
  43. 43. Where to Write Queries? Depends on your stack: • phpMyAdmin • Heroku Postgres Dataclips • Eclipse SQL Explorer • SQuirreL • Oracle SQL Developer
  44. 44. Finding Table and Column Names Connect to the database: • mysql [-u username] [-h hostname] database-name List all databases (type into MySQL prompt): • show databases Choose the database you want: • use <database-name> List all tables in the database: • show tables Describe a table: • describe <table-name>
  45. 45. Example: Finding repeat buyers Test SQL Database - http://www.w3schools.com/sql/trysql.asp?file name=trysql_select_all STOP How would you construct this query? Try writing it in on your own now.
  46. 46. Example: Finding repeat buyers
  47. 47. Understand Your User Demographics Let‘s say you want to answer the question ―what countries are most of my users from?‖ Write a query that pulls that information from the test W3schools database.
  48. 48. Answer: Understand Your User Demographics
  49. 49. Cohort Analysis See how groups of customers use your product
  50. 50. Cohort Analysis Cohort analysis leads to interesting, actionable data like the below
  51. 51. Closing That‘s it! Get the SQL creator spreadsheet, downloadable queries and additional resources at justinmares.com/sql

×