Last active
June 22, 2022 09:20
-
-
Save Mr--John-Doe/ba5a09ccbf2f68a0e7861aee90c91d7b to your computer and use it in GitHub Desktop.
original query - variants
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 da.username | |
, da.value:date as date | |
, da.value:hit_count as hit_count | |
, ua_1.value:user_address as user_address | |
, ua_2.value:user_mobile as user_mobile | |
, ua_3_optin.user_email_optin as user_email_optim | |
, ua_3_optin.optin_date as user_email_optin_date | |
, ua_4_optin.value:mobile as user_mobile_optin | |
, (.....) | |
FROM web.daily_activity da | |
LEFT JOIN web.user_attributes_1 ua_1 | |
ON ua_1.USERNAME = da.USERNAME | |
LEFT JOIN web.user_attributes_2 ua_2 | |
ON ua_2.USERNAME = da.USERNAME | |
LEFT JOIN web.user_attributes_3 ua_3 | |
ON ua_3.USERNAME = da.USERNAME | |
LEFT JOIN web.user_attributes_4 ua_4 | |
ON ua_4.USERNAME = da.USERNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment