MadiUnique holders daily growth
    Updated 2023-01-09
    with df1 as (
    select
    block_timestamp::Date as date,
    tx_to as wallet,
    sum (amount) as amount
    from solana.core.fact_transfers
    where mint = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
    group by 1,2
    UNION ALL
    select
    block_timestamp::Date as date,
    tx_from as wallet,
    sum (amount)*-1 as amount
    from solana.core.fact_transfers
    where mint = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
    group by 1,2),
    df as (
    select
    date,
    wallet,
    sum (amount) as total_volume,
    sum (total_volume) over (partition by wallet order by date rows between unbounded preceding and current row) as volume_per_wallet
    from df1
    group by 1,2)
    select
    date, count (distinct wallet) as holders,
    sum(holders) over (order by date) as cum_holders
    from df
    where total_volume > 0
    and date >= '2022-12-25' group by 1 order by 1
    Run a query to Download Data