Created
November 8, 2021 11:23
-
-
Save ddikman/f5308ca1d513c5495953f5751b68ce0a to your computer and use it in GitHub Desktop.
Example of
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 | |
case user.value.string_value | |
when '0' then 'Baseline' | |
when '1' then 'Other version' | |
else 'Error' | |
end as experiment_value, | |
count(distinct(user_pseudo_id)) as users, | |
count(*) as events, | |
(count(*) / count(distinct(user_pseudo_id))) as ratio | |
FROM `<project_name>.analytics_<id>.events_*`, | |
UNNEST(user_properties) as user | |
where event_name = 'view_item' | |
and user.key = 'firebase_exp_0' | |
group by experiment_value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment