Created
September 11, 2018 22:48
-
-
Save jonhilgart22/c1dfa4e153f610a3dfafd62262722c58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
a.subscription_invitee_credit_minutes, | |
mm.messager_campaign_category, | |
mm.messager_campaign_name, | |
count(distinct a.user_id) as n_users | |
from analytics.acquisition_credit_card_source_tracking a | |
join analytics.messager_message_results mm | |
on mm.user_id = a.user_id | |
-- email sent before card added | |
and mm.messager_message_created_at < a.credit_card_added_user_event_at | |
where summarized_reporting_cleaned_source = 'invite_cold' | |
and credit_card_added_user_event_at >= getdate() - '7 days'::interval | |
and subscription_invitee_credit_minutes <= 30 | |
--and messager_campaign_category = 'Invite' | |
group by 1,2,3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment