ramishoowUntitled Query
    Updated 2022-09-17
    with ramishoow as ( select block_timestamp:: date as time, from_address as wallet from ethereum_core.fact_transactions where block_timestamp:: date >= GETDATE() - interval '2 months'
    and to_address = lower('0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57') ), min_days_raw as ( select min(time) as min_date, wallet from ramishoow group by 2 ),
    min_days as ( select min_date, count(wallet) as wallet from min_days_raw group by 1 ), data_table as ( select rd.time, count(distinct(rd.wallet)) as distinct_wallets, count(md.wallet) as unique_wallets
    from ramishoow as rd left join min_days as md on rd.time=md.min_date group by 1 ) select *, sum(unique_wallets) over (partition by null order by time) as cumulative_unique_wallets from data_table