Updated 2024-10-25
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as swapper,
    symbol_in,
    symbol_out,
    token_in,
    token_out,
    greatest(symbol_in, symbol_out) || ' - ' || least(symbol_in, symbol_out) as token_pair,
    nvl(amount_in_usd, amount_out_usd) as amount_usd,
    'Ethereum' as chain
    from
    ethereum.defi.ez_dex_swaps
    where
    amount_usd < 1e7
    and platform ilike 'dodo%'

    union all

    select
    tx_hash,
    block_timestamp,
    origin_from_address as swapper,
    symbol_in,
    symbol_out,
    token_in,
    token_out,
    greatest(symbol_in, symbol_out) || ' - ' || least(symbol_in, symbol_out) as token_pair,
    nvl(amount_in_usd, amount_out_usd) as amount_usd,
    'Polygon' as chain
    from
    polygon.defi.ez_dex_swaps
    where
    QueryRunArchived: QueryRun has been archived