vendettaDistribution of swaps by pool BUSD volume swapped dist
    Updated 2023-02-16
    -- forked from c13eb488-d4c1-4c95-8131-02b262555e2c


    SELECT
    date_trunc('day',block_timestamp) as weeks,
    --case when block_timestamp<'2022-10-10' then 'Previous to staking' else 'After staking' end as period,
    pool_name,
    count(DISTINCT tx_hash) as swaps,
    sum(AMOUNT_IN_USD) as volume
    FROM ethereum.core.ez_dex_swaps
    WHERE (symbol_in='BUSD' or symbol_out='BUSD') and AMOUNT_IN_USD is not null AND AMOUNT_IN_USD>100000 and block_timestamp>='2023-01-01'
    GROUP BY 1,2 order by 1 asc


    Run a query to Download Data