freemartianFlow monthly wallets - SAM
    Updated 2022-08-18
    with total_wallets as (
    select
    count(proposer) as new_wallets,
    date_trunc('month', min_date) as creation_month,
    sum(new_wallets) over (order by creation_month asc) as new_wallets_up_to_date
    from (
    select
    proposer,
    min(block_timestamp::date) as min_date
    from flow.core.fact_transactions
    group by proposer)
    group by creation_month
    ),

    active_wallets as (
    select
    count(distinct proposer) as active_wallet,
    date_trunc('month', block_timestamp::date) as TIME
    from flow.core.fact_transactions
    group by TIME
    )
    select
    creation_month,
    new_wallets,
    active_wallet,
    new_wallets_up_to_date,
    100 * active_wallet/new_wallets_up_to_date as percentage_of_active_over_total
    from total_wallets
    left join active_wallets on creation_month = TIME


    Run a query to Download Data