Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH
- pp as (select full_reg_datetime, uid from analytics.parent_properties where full_reg_datetime >= '2024-10-01'),
- users AS (
- SELECT dt,
- uid,
- IF(visitParamExtractString(addJson, 'option') = 'new', 'New', 'Old') AS groups,
- CASE
- WHEN (deviceType = 2 AND appVersion % 2 = 0) THEN 'iOS'
- WHEN (deviceType = 1 AND appVersion % 2 = 1) THEN 'Android'
- ELSE 'Unknown'
- END AS platform, action
- FROM stat.funnelTrack
- join pp using(uid)
- WHERE
- (
- (action = 'pteam_notification_setting_in_menu_newuser' and full_reg_datetime = dt_exp_distr_event)
- OR
- action = 'pteam_notification_setting_in_menu_olduser' and full_reg_datetime < '2024-10-01' - interval '120 day')
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement