MLDZMNAB.token1
    Updated 2022-09-25
    with tb1 as (select
    ADDRESS_NAME as token1,
    count (distinct sender) as new_users
    --sum(new_users) over (partition by ADDRESS_NAME order by day) as cum_new_users
    from (
    select
    distinct SWAPPER as sender,
    ADDRESS_NAME,
    min(block_timestamp) as first_transaction_stamp
    from solana.core.fact_swaps s left join solana.core.dim_labels b on s.SWAP_TO_MINT=b.ADDRESS
    where block_timestamp>='2022-05-01'
    and succeeded = TRUE
    group by 1,2
    )
    group by 1 having token1 is not null
    order by 2 desc limit 10
    )

    select
    date_trunc('day', first_transaction_stamp) as day,
    ADDRESS_NAME as token,
    count (distinct sender) as new_users,
    sum(new_users) over (partition by token order by day) as cum_new_users
    from (
    select
    distinct SWAPPER as sender,
    ADDRESS_NAME,
    min(block_timestamp) as first_transaction_stamp
    from solana.core.fact_swaps s left join solana.core.dim_labels b on s.SWAP_TO_MINT=b.ADDRESS
    where block_timestamp>='2022-05-01'
    and succeeded = TRUE
    and ADDRESS_NAME in (select token1 from tb1)
    group by 1,2
    )
    group by 1,2

    Run a query to Download Data