maybeyonaswallet_pops
    Updated 2023-03-27
    with wallets as (
    select
    block_timestamp,
    from_address as address
    from thorchain.transfers
    union all
    select
    block_timestamp,
    to_address as address
    from thorchain.transfers
    ),
    start_wallet as (
    select distinct * from (
    select
    last_value(block_timestamp) over (partition by address order by block_timestamp desc) as start_time,
    address
    from wallets
    )
    ),
    daily_new as (
    select
    date(start_time) as date,
    count(address) as new_address
    from start_wallet
    group by 1
    )

    select
    date,
    new_address,
    sum(new_address) over (order by date rows unbounded preceding) as addressess
    from daily_new
    -- limit 100
    Run a query to Download Data