Updated 2024-11-28
    with
    -- SWAPS ON APTOS --
    aptos_usdy_swaps as (
    select
    block_timestamp,
    tx_hash,
    'Aptos' as blockchain,
    platform,
    swapper as user_address,
    symbol_in::string as symbol_in,
    symbol_out::string as symbol_out,
    amount_in,
    amount_in_usd,
    amount_out,
    amount_out_usd
    from aptos.defi.ez_dex_swaps
    where (token_in = '0xcfea864b32833f157f042618bd845145256b1bf4c0da34a7013b76e42daa53cc::usdy::USDY'
    or token_out = '0xcfea864b32833f157f042618bd845145256b1bf4c0da34a7013b76e42daa53cc::usdy::USDY')
    and block_timestamp >= '2024-07-01'
    ),

    -- SWAPS ON ETHEREUM --
    ethereum_usdy_swaps as (
    select
    block_timestamp,
    tx_hash,
    'Ethereum' as blockchain,
    platform,
    ORIGIN_FROM_ADDRESS as user_address,
    symbol_in::string as symbol_in,
    symbol_out::string as symbol_out,
    amount_in,
    amount_in_usd,
    amount_out,
    amount_out_usd
    from ethereum.defi.ez_dex_swaps
    QueryRunArchived: QueryRun has been archived