Abolfazl_771025stETH weekly swap volume at each pool
    Updated 2022-09-26
    with stETH as (select
    block_timestamp,
    pool_name,
    SUM(IFF(SYMBOL_IN IN ('stETH', 'wstETH'), amount_in_usd, 0)) as "steth sell volume",
    SUM(IFF(SYMBOL_OUT IN ('stETH', 'wstETH'), amount_out_usd, 0)) as "steth buy volume"
    from ethereum.core.ez_dex_swaps
    where symbol_in like '%stETH%'
    and amount_in_usd>0
    and block_timestamp >= '2022-01-01'
    group by 1,2)
    SELECT
    date_trunc('week',block_timestamp) as date,
    pool_name,
    sum("steth sell volume")+sum("steth buy volume") as "total swap volume"
    from stETH
    group by 1,2
    Run a query to Download Data