nasdfajsklj2024-07-19 stable vs meme original trade
    Updated 2024-10-03
    -- forked from 2024-07-19 stable % @ https://flipsidecrypto.xyz/studio/queries/3053fa22-76d2-40c5-8665-5aa8fb43aae0

    with excluded as (
    select lower(address) as address from (
    values
    ('0xc8c0e780960f954c3426a32b6ab453248d632b59') --old fee address
    ,('0x77777d91c0b8ec9984a05302e4ef041dccf77fee') --new fee address
    ,('0xf70da97812cb96acdf810712aa562db8dfa3dbef') --relay
    ,('0x85c153aae1f101af08151863306d9e0b823ea1b5') --my address, from one time sending relay funds to fee address
    ,('0x3a23f943181408eac424116af7b7790c94cb97a5') --socket

    ) as t(address)
    )
    , txs as (
    select tx_hash --block_timestamp, contract_address, symbol, amount_usd, origin_to_address, 'ETH' as chain
    from ethereum.core.ez_token_transfers
    where to_address = '0x77777d91c0b8ec9984a05302e4ef041dccf77fee'
    and origin_from_address not in (select address from excluded)
    and block_timestamp::date > '2024-04-10'
    and symbol not in ('Shiba 2.0', 'INNBC')
    union all
    select tx_hash --block_timestamp, 'native' as contract_address, 'native' as symbol, amount_usd, origin_to_address, 'ETH' as chain
    from ethereum.core.ez_native_transfers
    where to_address = '0x77777d91c0b8ec9984a05302e4ef041dccf77fee'
    and origin_from_address not in (select address from excluded)
    and block_timestamp::date > '2024-04-10'
    )
    ,labels as (
    select
    token_out
    ,token_in
    ,symbol_out
    ,symbol_in
    ,case
    when (symbol_out in ('USDC','WETH','USDT','WBTC','SOL','DOGE','DAI') or symbol_out like '%ETH')
    and (symbol_in in ('USDC','WETH','USDT','WBTC','SOL','DOGE','DAI') or symbol_in like '%ETH')
    QueryRunArchived: QueryRun has been archived