HadisehDaily Active User 2
    Updated 2023-02-13
    with tb as ( select tx_from,count(DISTINCT tx_id) as transactions
    from osmosis.core.fact_transactions
    where TX_SUCCEEDED = 'True'
    group by tx_from),
    t1 as ( select DISTINCT tx_from
    from tb
    where transactions >= 20)
    select trunc(block_timestamp, 'month') as months,
    'Active wallet' as status,
    COUNT(DISTINCT(tx_from)) as total_wallet,
    sum(total_wallet) over (order by months asc) as cumulative_wallet
    from osmosis.core.fact_transactions
    where tx_from in (select tx_from from t1)
    and months >= CURRENT_DATE - 365
    group by months,status
    UNION
    select trunc(block_timestamp, 'month') as months,
    'Normal wallet' as status,
    COUNT(DISTINCT(tx_from)) as total_wallet,
    sum(total_wallet) over (order by months asc) as cumulative_wallet
    from osmosis.core.fact_transactions
    where tx_from not in (select tx_from from t1)
    and months >= CURRENT_DATE - 365
    group by months,status
    Run a query to Download Data