0-MIDavg per day
    Updated 2023-06-01
    with act1 as (
    with tab1 as (
    select BLOCK_TIMESTAMP::date as date
    ,case
    when BLOCK_TIMESTAMP>='2023-05-11' and BLOCK_TIMESTAMP<='2023-05-20' then '10 DAYS Before Delay'
    when BLOCK_TIMESTAMP>'2023-05-20' and BLOCK_TIMESTAMP<'2023-05-31' then '10 DAYS After Delay' end as time_period
    ,AMOUNT_OUT as buy_volume
    ,ORIGIN_FROM_ADDRESS as buyer
    ,TX_HASH as buy_count
    from ethereum.core.ez_dex_swaps
    where TOKEN_OUT ='0x65ef703f5594d2573eb71aaf55bc0cb548492df4'
    and BLOCK_TIMESTAMP>='2023-05-11' and BLOCK_TIMESTAMP<'2023-05-31'),
    tab2 as (
    select BLOCK_TIMESTAMP::date as date
    ,case
    when BLOCK_TIMESTAMP>='2023-05-11' and BLOCK_TIMESTAMP<='2023-05-20' then '10 DAYS Before Delay'
    when BLOCK_TIMESTAMP>'2023-05-20' and BLOCK_TIMESTAMP<'2023-05-31' then '10 DAYS After Delay' end as time_period
    ,AMOUNT_IN as sell_volume
    ,ORIGIN_FROM_ADDRESS as seller
    ,TX_HASH as sell_count
    from ethereum.core.ez_dex_swaps
    where TOKEN_IN ='0x65ef703f5594d2573eb71aaf55bc0cb548492df4'
    and BLOCK_TIMESTAMP>='2023-05-11' and BLOCK_TIMESTAMP<'2023-05-31')
    select tab2.date
    ,tab2.time_period
    ,sum(buy_volume) as buy_volumes
    ,count(distinct buyer) as buyers
    ,count(distinct buy_count) as buy_counts
    ,sum(sell_volume) as sell_volumes
    ,count(distinct seller) as sellers
    ,count(distinct sell_count) as sell_counts
    from tab1
    left join tab2
    on tab1.date=tab2.date
    group by 1,2)
    select time_period
    Run a query to Download Data