ZSaed4.swap data from eth to other token
    Updated 2023-02-11
    select
    sum(AMOUNT_IN) as eth_volume,
    sum(AMOUNT_IN_USD) as usd_volume,
    count(DISTINCT tx_hash) as num_tx,
    count(DISTINCT ORIGIN_FROM_ADDRESS) as num_form_address,
    count(DISTINCT ORIGIN_TO_ADDRESS) as num_to_address,
    'From ETH TO Other Token' as category

    from ethereum.core.ez_dex_swaps
    where SYMBOL_IN ='WETH'
    UNION
    select
    sum(AMOUNT_OUT) as eth_volume,
    sum(AMOUNT_OUT_USD) as usd_volume,
    count(DISTINCT tx_hash) as num_tx,
    count(DISTINCT ORIGIN_FROM_ADDRESS) as num_form_address,
    count(DISTINCT ORIGIN_TO_ADDRESS) as num_to_address,
    'From Other Token TO ETH' as category

    from ethereum.core.ez_dex_swaps
    where SYMBOL_OUT ='WETH'

    Run a query to Download Data