Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of
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