Created
June 6, 2014 16:00
-
-
Save soandos/e46a770a007e9d999ea0 to your computer and use it in GitHub Desktop.
Get bulk data
This file contains hidden or 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
| #explain extended | |
| select | |
| mc.phone_number, | |
| mc.email, | |
| mc.first_name, | |
| mc.last_name, | |
| mc.geocoded_postal_code, | |
| mc.city, | |
| mc.all_campaigns, | |
| mc.first_campaign, | |
| mc.DOB, | |
| mc.status, | |
| mc.ftaf_count, | |
| mc.ftaf_betas, | |
| mc.Texting_Preferences, | |
| substring(mc.source_name, 1, 14) as source_number, | |
| mc.source_type, | |
| mc.created_at, | |
| mc.opted_out_at, | |
| mc.opt_out_source, | |
| mc.mo_count, | |
| mc.mt_count, | |
| mc.last_mo_at, | |
| ma.created_at, | |
| ma.first_name, | |
| ma.last_name, | |
| ma.postal, | |
| ma.city, | |
| ma.email, | |
| ma.phone, | |
| group_concat(ma.campaign_id SEPARATOR '|') | |
| from | |
| data.mcomm mc | |
| join | |
| mobile_actions ma ON ma.phone = mc.phone_number | |
| OR ma.email = mc.email | |
| group by ma.phone; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment