Advertisement
kirzecy670

Untitled

Oct 7th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.67 KB | None | 0 0
  1. SELECT
  2. action,
  3. CASE
  4.       WHEN (deviceType = 2 AND appVersion % 2 = 0) THEN 'iOS_Parent'
  5.       WHEN (deviceType = 1 AND appVersion % 2 = 1) THEN 'Android_Parent'
  6.       WHEN (deviceType = 2 AND appVersion % 2 = 1) THEN 'iOS_Child'
  7.       WHEN (deviceType = 1 AND appVersion % 2 = 0) THEN 'Android_Child'
  8.       ELSE 'Unknown'
  9. END AS platform,
  10. visitParamExtractString(addJson, 'option') as exp_group,
  11. --dt,
  12. uniqCombined(uid) as users
  13. FROM funnelTrack ft
  14. where dt >= '2024-09-01'
  15. and `action` in ('pteam_notification_setting_in_menu_olduser', 'pteam_notification_setting_in_menu_newuser')
  16. group by 1, 2, 3 --, 4
  17. HAVING users > 100
  18. ORDER BY action, platform, exp_group --, dt;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement