MLDZMNbonk5
    Updated 2023-06-07
    -- forked from pepe5 @ https://flipsidecrypto.xyz/edit/queries/13ebe151-38f9-40e2-80dd-bf56bb791795

    -- forked from ETH.swap @ https://flipsidecrypto.xyz/edit/queries/106cfd01-da2b-4953-a457-ece8cd2c4df6
    select
    BLOCK_TIMESTAMP::date as day,
    'Sell BONK' as swap_type,
    count(distinct TX_ID) as no_swaps,
    count(distinct SWAPPER) as no_traders,
    sum(SWAP_FROM_AMOUNT) as total_volume,
    avg(SWAP_FROM_AMOUNT) as avg_volume,
    sum(total_volume) over (order by day) as cum_volume
    from solana.core.fact_swaps
    where BLOCK_TIMESTAMP>=current_date-30
    and SWAP_FROM_MINT='DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
    and SUCCEEDED = 'TRUE'
    group by 1
    union all
    select
    BLOCK_TIMESTAMP::date as day,
    'Buy BONK' as swap_type,
    count(distinct TX_ID) as no_swaps,
    count(distinct SWAPPER) as no_traders,
    sum(SWAP_TO_AMOUNT) as total_volume,
    avg(SWAP_TO_AMOUNT) as avg_volume,
    sum(total_volume) over (order by day) as cum_volume
    from solana.core.fact_swaps
    where BLOCK_TIMESTAMP>=current_date-30
    and SWAP_TO_MINT='DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
    and SUCCEEDED = 'TRUE'
    group by 1



    Run a query to Download Data