This is a SQL script/Jupyter Notebook duo that calculates key metrics for marketing departments, like the cost of acquiring a new customer (CAC), cost per click (CPC), cost per impression (CPM), customer lifetime value (LTV), and click-through rate (CTR).
-
You'll need to fork or clone the repo, then go into MySQL or whatever other SQL client you use and input the .csv files from
/01_data/
into a database. I called my database marketing_analysis. You can call yours whatever you like. -
Next, you'll connect to the database. It should work to just follow along in the analysis_queries.sql file.
When working on the Jupyter Notebook, make sure to adjust the %cd command at the top to the directory of your local repo.
Enjoy!