NavidUntitled Query
    Updated 2022-12-07
    select
    date_trunc('week', block_timestamp) as day,
    'Swap Out' as type,
    count(distinct tx_hash) as swap_cnt,
    count(distinct ORIGIN_FROM_ADDRESS) as swapper_cnt,
    sum(AMOUNT_OUT_USD) as volume_usd
    from
    ethereum.core.ez_dex_swaps
    where
    TOKEN_IN ilike '0x4d224452801ACEd8B2F0aebE155379bb5D594381' and AMOUNT_OUT_USD is not null
    group by 1
    union all
    select
    date_trunc('week', block_timestamp) as day,
    'Swap In' as type,
    count(distinct tx_hash) as swap_cnt,
    count(distinct ORIGIN_to_ADDRESS) as swapper_cnt,
    sum(AMOUNT_IN_USD) as volume_usd
    from
    ethereum.core.ez_dex_swaps
    where
    TOKEN_out ilike '0x4d224452801ACEd8B2F0aebE155379bb5D594381' and AMOUNT_IN_USD is not null
    group by 1
    Run a query to Download Data