messariflow stats: active users (over time) weekly copy
    Updated 5 days ago
    -- forked from adriaparcerisas / flow stats: active users (over time) weekly @ https://flipsidecrypto.xyz/adriaparcerisas/q/WJPW_oThin6W/flow-stats-active-users-over-time-weekly


    with
    news as (
    SELECT
    distinct authorizers as users,
    min(trunc(block_timestamp,'day')) as debut
    from flow.core.fact_transactions
    group by 1
    ),
    news2 as (
    select distinct debut,
    count(distinct users) as new_users
    from news group by 1
    ),
    actives as (
    SELECT
    trunc(block_timestamp,'day') as day,
    count(distinct authorizers) as active_users
    from flow.core.fact_transactions x
    group by 1 order by 1 desc
    )
    select
    day, active_users,new_users
    from actives a join news2 n on a.day=n.debut
    --where month<trunc(current_date,'week')
    order by 1 asc





    Last run: 5 days ago
    DAY
    ACTIVE_USERS
    NEW_USERS
    1
    2020-08-18 00:00:00.0002020
    2
    2020-08-19 00:00:00.0007165
    3
    2020-08-20 00:00:00.00011163
    4
    2020-08-21 00:00:00.0008120
    5
    2020-08-22 00:00:00.000646
    6
    2020-08-23 00:00:00.0007419
    7
    2020-08-24 00:00:00.0008422
    8
    2020-08-25 00:00:00.0008012
    9
    2020-08-26 00:00:00.0008212
    10
    2020-08-27 00:00:00.00010129
    11
    2020-08-28 00:00:00.000819
    12
    2020-08-29 00:00:00.000445
    13
    2020-08-30 00:00:00.000534
    14
    2020-08-31 00:00:00.00013633
    15
    2020-09-01 00:00:00.000544
    16
    2020-09-02 00:00:00.00010612
    17
    2020-09-03 00:00:00.0008812
    18
    2020-09-04 00:00:00.000632
    19
    2020-09-05 00:00:00.0006914
    20
    2020-09-06 00:00:00.000492
    ...
    1702
    65KB
    62s