Created
May 31, 2022 07:49
-
-
Save Mr--John-Doe/ac5c4cf8f823bccc32a82e0132c64bf3 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 da.username | |
, da.date | |
, da.hit_count | |
, ua_1.value as user_address | |
, ua_2.value as user_mobile | |
, ua_3.value as user_email_optin | |
FROM web.daily_activity da | |
LEFT JOIN web.user_attributes_1 ua_1 | |
ON ua_1.USERNAME = da.USERNAME | |
AND ua_1.attribute_name = 'MAIN_ADDRESS' | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment