Sandeshunique buyers new
    Updated 2023-02-24
    with dex as
    (
    with
    first_swap as (
    select swapper,swap_program,min(block_timestamp) as block_timestamp_min
    from
    solana.core.fact_swaps
    where
    swap_to_mint = 'BWXrrYFhT7bMHmNBFoQFWdsSgA3yXoAnMhDK6Fn1eSEn'
    group by 1,2
    )
    select
    block_timestamp_min::date as "date",
    SWAP_PROGRAM as program,
    count(distinct swapper) as new_users,
    sum(new_users) over(partition by program order by "date") as total_buyers_program,
    sum(new_users) over (order by "date" asc) as total_buyers,
    'DEX' as user_type
    from first_swap
    group by "date",program,user_type order by 1 asc
    ),
    claims as
    (
    with claimed_addresses as
    (
    select tx_to,min(block_timestamp) as block_timestamp_min from solana.core.fact_transfers
    where mint='BWXrrYFhT7bMHmNBFoQFWdsSgA3yXoAnMhDK6Fn1eSEn'
    and tx_from='AojtngqK2RoX5WXhnEfBmduZnGZfZYi8jMy69wzXKYPM'
    group by tx_to
    )
    select
    block_timestamp_min::date as "date",
    'hades emission' as program,
    count(distinct tx_to) as new_users,
    sum(new_users) over (order by "date" asc) as total_buyers,
    sum(new_users) over (order by "date" asc) as total_buyers,
    Run a query to Download Data