Hello! This question is about the Marketing Attribution project in the Analyze Real Data chapter of the Data Science course.
Just curious if anyone else noticed a discrepancy between the total number of purchases made, and the number of purchases made from the last touch attribution?
When I ran a query to find the total number of users to make a purchase, I got 361:
SELECT distinct user_id FROM mark_att WHERE page_name LIKE '%4%'
But when I ran a query to find the number of users who made a purchase from their last touch, I got 316:
/*CREATE TABLE last_touch AS*/ WITH last_touch AS ( SELECT distinct user_id, MAX(timestamp) AS 'last_touch_at' FROM mark_att GROUP BY user_id) SELECT distinct lt.user_id, lt.last_touch_at, ma.utm_campaign, ma.page_name FROM last_touch AS 'lt' JOIN mark_att AS 'ma' ON lt.user_id = ma.user_id AND lt.last_touch_at = ma.timestamp; SELECT COUNT(distinct user_id) FROM last_touch WHERE page_name like '%4%';
Did anyone else notice this difference? When I counted the number of users to make a purchase from their first touch, I got 2.
Does this mean the other 43 purchases happened during other webpage access occurrences (not first or last touch)? Or am I writing my query incorrectly?
Any insight is helpful, thank you!