Data Matchbacks in SQL, mySQL, Access
October 14th, 2009 Posted in tech tipsTo better understand where your customers come from and the value of your marketing investment, you can use a data matchback. For example, let’s say that you sent an email to a list of leads that you purchased and now you want to see how many of those email addresses have made a purchase, you would matchback customers to your list. The technique is simple and straight SQL.
- Import customers into an empty table called “customers”
- Import leads into another empty table in the same database called “leads”
SELECT * FROM customers INNER JOIN leads ON customers.email=leads.email; |
That should do it, however you may want to list the fields instead of using the * wildcard. To do this, just list the fields using the table.field convention so that it is clear which fields should be selected by the query.
One final tip: export the data to excel and analyze it in a pivot table.