0-MIDpepe swap stats
    Updated 2023-05-06
    select BLOCK_TIMESTAMP::date as date
    ,sum(case when TOKEN_IN='0x6982508145454ce325ddbe47a25d4ec3d2311933' then AMOUNT_IN_USD end) as sell_volume
    ,sum(case when TOKEN_OUT='0x6982508145454ce325ddbe47a25d4ec3d2311933' then AMOUNT_OUT_USD end) as buy_volume
    ,count (distinct case when TOKEN_IN='0x6982508145454ce325ddbe47a25d4ec3d2311933' then ORIGIN_FROM_ADDRESS end) as sellers
    ,count (distinct case when TOKEN_OUT='0x6982508145454ce325ddbe47a25d4ec3d2311933' then ORIGIN_FROM_ADDRESS end) as buyers
    ,count (distinct case when TOKEN_IN='0x6982508145454ce325ddbe47a25d4ec3d2311933' then TX_HASH end) as sell_count
    ,count (distinct case when TOKEN_OUT='0x6982508145454ce325ddbe47a25d4ec3d2311933' then TX_HASH end) as buy_count
    ,sum(sell_volume)over(order by date) as total_sell_volume
    ,sum(buy_volume)over(order by date) as total_buy_volume
    ,sum(sellers)over(order by date) as total_sellers
    ,sum(buyers)over(order by date) as total_buyers
    ,sum(sell_count)over(order by date) as total_sell_count
    ,sum(buy_count)over(order by date) as total_buy_count
    from ethereum.core.ez_dex_swaps
    where date>='2023-04-17'
    and AMOUNT_IN_USD is not null
    and AMOUNT_OUT_USD is not null
    group by 1

    Run a query to Download Data