AntonidasDEX Swaps for ETH
    Updated 2023-06-29
    with in_flow as (
    select
    date_trunc('day', block_timestamp) as day_date,
    0-sum(amount_in) as total_eth_sold
    from ethereum.core.ez_dex_swaps
    where symbol_in = 'WETH'
    and block_timestamp > current_date - 30
    group by 1
    ),
    out_flow as (
    select
    date_trunc('day', block_timestamp) as day_date_2,
    sum(amount_out) as total_eth_bought
    from ethereum.core.ez_dex_swaps
    where symbol_out = 'WETH'
    and block_timestamp > current_date - 30
    group by 1
    )

    select *,
    total_eth_sold + total_eth_bought as diff
    from in_flow
    join out_flow on day_date = day_date_2

    Run a query to Download Data