rajsFlow User Dropoff
    Updated 2022-07-19
    with new_users as
    (
    SELECT
    authorizers[0] as user,
    date_part('week', min(date_trunc('week', block_timestamp))) as joined_week
    from flow.core.fact_transactions
    where block_timestamp >= '2022-04-01'
    group by 1
    -- limit 3
    )
    ,

    active_users as
    (
    SELECT
    authorizers[0] as user,
    date_part('week', block_timestamp) as active_week
    from flow.core.fact_transactions
    where block_timestamp >= '2022-04-01'
    group by 1,2
    )
    ,

    combined AS
    (
    SELECT
    a.user as user,
    active_week,
    joined_week
    from active_users a
    left join new_users n
    on a.user = n.user
    )
    ,

    reqd_table as
    Run a query to Download Data