Alexayswaps
    Updated 2022-09-13
    with steth_in as ( select block_timestamp::date as date, sum(amount_in) as steth_sell
    from ethereum.core.ez_dex_swaps
    where symbol_in like '%stETH%' and amount_in_usd>0
    and date >= '2022-01-01'
    group by date ),

    steth_out as ( select block_timestamp::date as date, sum(amount_out) as steth_buy
    from ethereum.core.ez_dex_swaps
    where symbol_out like '%stETH%' and amount_out_usd>0
    and date >= '2022-01-01'
    group by date ),

    reth_in as ( select block_timestamp::date as date, sum(amount_in) as reth_sell
    from ethereum.core.ez_dex_swaps
    where symbol_in like '%rETH%' and amount_in_usd>0
    and date >= '2022-01-01'
    group by date ),

    reth_out as ( select block_timestamp::date as date, sum(amount_out) as reth_buy
    from ethereum.core.ez_dex_swaps
    where symbol_out like '%rETH%' and amount_out_usd>0
    and date >= '2022-01-01'
    group by date ),


    aeth_in as ( select block_timestamp::date as date, sum(amount_in) as aeth_sell
    from ethereum.core.ez_dex_swaps
    where symbol_in like '%aETH%' and amount_in_usd>0
    and date >= '2022-01-01'
    group by date ),

    aeth_out as ( select block_timestamp::date as date, sum(amount_out) as aeth_buy
    from ethereum.core.ez_dex_swaps
    where symbol_out like '%aETH%' and amount_out_usd>0
    and date >= '2022-01-01'
    group by date )