adriaparcerisasArt gobblers 3
    Updated 2022-11-07
    select trunc(block_timestamp,'hour') as date,
    case when token_in='0x600000000a36f3cd48407e35eb7c5c910dc1f7a8' then 'in'
    else 'out' end as direction,
    count(distinct tx_hash) as swaps,
    count(distinct origin_from_address) as users_swapping,
    sum(case when token_in='0x600000000a36f3cd48407e35eb7c5c910dc1f7a8' then amount_in else amount_out end) as goo_volume
    from ethereum.core.ez_dex_swaps
    where block_timestamp>=CURRENT_DATE-90 and (token_in='0x600000000a36f3cd48407e35eb7c5c910dc1f7a8' or token_out='0x600000000a36f3cd48407e35eb7c5c910dc1f7a8') --and origin_function_signature='0x5ae401dc'
    group by 1,2
    order by 1 asc

    Run a query to Download Data