sepehrmhz82023-06-12 11:33 AM
    Updated 2023-06-25
    select
    case
    when symbol_in = 'COMP' then 'SELL'
    when symbol_out = 'COMP' then 'BUY'
    end as swap_type,
    count(distinct tx_hash) as Txs,
    sum(
    case
    when symbol_in = 'COMP' then amount_in_usd
    else amount_out_usd
    end
    ) Volume
    from
    ethereum.core.ez_dex_swaps
    where
    (
    symbol_in = 'COMP'
    or symbol_out = 'COMP'
    )
    group by
    1

    Run a query to Download Data