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
userpseudoid as userid
geo.country as country,
eventtimestamp,
CASE
WHEN paramsvalue.stringvalue 'Duas' or paramsvalue.stringvalue 'DuasTopics' THEN 'Duas'
WHEN paramsvalue.stringvalue 'Explore' or paramsvalue.stringvalue 'Topic' THEN 'Explore by Topic'
ELSE paramsvalue.stringvalue
END AS screenname,
FROM
table AS base,
UNNESTeventparams AS params
WHERE
eventname 'screenview'
AND paramskey 'firebasescreen'
AND eventdate between and
remove AS
SELECT
distinct userpseudoid
FROM
table
where eventname'appremove'
AND eventdate between and
I want to find out the top countries where screenname 'settings' was the last screen viewed before app removal, along with the of associated users.
For example Malaysia has 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
