afonsoTotal Swap Number of ETH classifying By Swap Type
    Updated 2023-01-20
    with t as (
    select
    'Swap FROM ETH' as action,
    count(distinct tx_hash) as swaps_count,
    count(distinct sender) as swappers_count,
    sum(amount_in_usd) as total_amount_usd,
    avg(amount_in_usd) as average_amount_usd
    from ethereum.core.ez_dex_swaps
    where event_name = 'Swap'
    and block_timestamp between '2022-01-01' and '2022-01-16'
    and symbol_in = 'WETH'

    union

    select
    'Swap TO ETH' as action,
    count(distinct tx_hash) as swaps_count,
    count(distinct sender) as swappers_count,
    sum(amount_out_usd) as total_amount_usd,
    avg(amount_out_usd) as average_amount_usd
    from ethereum.core.ez_dex_swaps
    where event_name = 'Swap'
    and block_timestamp between '{{ start_date }}' and '{{ end_date }}'
    and symbol_out = 'WETH'
    )

    select * from t
    Run a query to Download Data