Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

3.4 Define HRIS and describe its main components.

Answered: 1 week ago