Question: I have two CTE's: with screen as ( SELECT user _ pseudo _ id as user _ id , geo.country as country, event _ timestamp,

I have two CTE's:
with screen as
(
SELECT
user_pseudo_id as user_id,
geo.country as country,
event_timestamp,
CASE
WHEN params1.value.string_value = 'Duas' or params1.value.string_value = 'DuasTopics' THEN 'Duas'
WHEN params1.value.string_value = 'Explore' or params1.value.string_value = 'Topic' THEN 'Explore by Topic'
ELSE params1.value.string_value
END AS screen_name,
FROM
`table` AS base,
UNNEST(event_params) AS params1
WHERE
event_name = 'screen_view'
AND params1.key = 'firebase_screen'
AND event_date between '20231001' and '20231231'
)
,
remove AS (
SELECT
distinct user_pseudo_id
FROM
`table`
where event_name='app_remove'
AND event_date between '20231001' and '20231231'
)
I want to find out the top 10 countries where screen_name 'settings' was the last screen viewed before app removal, along with the % of associated users.
For example Malaysia has 70% users who viewed 'settings' before removing the app.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!