Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- interval_date,
- activity_day_since_24_08_2022,
- SUM(
- CASE
- WHEN is_ftd = True then 1
- else 0
- end
- ) ftds,
- SUM(DAILY_IAP) as Revenue,
- count(distinct user_id) as active_users,
- count(
- distinct case
- when lt_purchases_amt > 0 then user_id
- end
- ) active_paying_users
- from
- (
- SELECT
- *,
- row_number() over(
- partition by user_id
- order by
- interval_date
- ) activity_day_since_24_08_2022
- FROM
- MATCH_MASTERS.prod.daily_users_from_params
- where
- interval_date >= '2022-08-24'
- and is_active = 1
- and first_install_dt >= '2022-08-24'
- )
- group by
- 1,
- 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement