shreexFlow Active
    Updated 2023-01-11
    with wallets as (
    select
    proposer as user,
    max(block_timestamp) as max,
    min(block_timestamp) as min
    from flow.core.fact_transactions
    GROUP BY user
    ),
    dau as (
    select
    date_trunc('month',block_timestamp) as date1,
    proposer as dau ,
    count(*) as txs
    from flow.core.fact_transactions where block_timestamp >= '2022-12-01'
    group by date1,dau
    HAVING txs > 5
    )
    , actives as (
    select
    'Active Wallets' as type,
    count(distinct user) as user_count
    from wallets where max >= '2022-12-01'
    ),
    not_active as (
    select
    'Unactive Wallets' as type,
    count(distinct user) as user_count
    from wallets where max < '2022-12-01'
    ),
    alll as (
    select
    'All Wallets' as type,
    count(distinct user) as user_count
    from wallets
    ),
    Run a query to Download Data