thea[Blur Mega] Daily Cum & New Wallets
    Updated 2023-04-13
    /*
    - Accumulative Traders
    - Daily New Users
    */

    select *,
    sum(new_wallets) over (order by block_date rows between unbounded preceding and current row) as cum_walltes
    from (
    select to_date(date_trunc('day', block_timestamp)) as block_date,
    count(distinct wallet) as new_wallets
    from (
    select *,
    row_number() over (partition by wallet order by block_timestamp) as rnk
    from (
    select block_timestamp,
    buyer_address as wallet
    from ethereum.core.ez_nft_sales
    where platform_name = 'blur'
    and price_usd is not null
    union all
    select block_timestamp,
    seller_address as wallet
    from ethereum.core.ez_nft_sales
    where platform_name = 'blur'
    and price_usd is not null
    )
    )
    where rnk = 1
    group by 1
    )
    Run a query to Download Data