Hossein2024-07-14 05:16 PM copy copy copy
    Updated 2024-07-14
    with arbitrum as (
    select
    block_timestamp::Date AS date,tx_hash,
    amount_in_usd AS amountUSD,
    origin_from_address as user
    from arbitrum.defi.ez_dex_swaps
    where amount_in_usd<power(10,6)
    and tx_hash in (select distinct(tx_hash) from arbitrum.core.ez_decoded_event_logs where origin_to_address in ('0x5e325eda8064b456f4781070c0738d849c824258','0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b','0x4c60051384bd2d3c01bfc845cf5f4b44bcbe9de5'))
    and date>='2023-01-01'
    and platform like 'uniswap%'
    and date<'2023-10-17'
    ),

    alternatives as (
    select
    block_timestamp::Date AS date,tx_hash,
    amount_in_usd AS amountUSD,
    origin_from_address as user,
    case platform
    when 'kyberswap-v1' then 'kyberswap'
    when 'kyberswap-v2' then 'kyberswap'
    when 'pancakeswap-v2' then 'pancakeswap'
    when 'pancakeswap-v3' then 'pancakeswap'
    when 'kyberswap-v1' then 'kyberswap'
    when 'hashflow-v3' then 'hashflow'
    when 'trader-joe-v2' then 'trader-joe'
    when 'dodo-v1' then 'dodo'
    when 'dodo-v2' then 'dodo'
    else platform
    end as platform
    from ethereum.defi.ez_dex_swaps
    where amount_in_usd<power(10,6)
    and date>='2023-01-01'
    and not platform like 'uniswap%'
    )

    QueryRunArchived: QueryRun has been archived