nasdfajskljphantom evm
    Updated 2024-08-20
    with addresses as (
    select lower(address) as address from (
    values
    ('0x7afa9d836d2fccf172b66622625e56404e465dbd') --phantom evm?

    ) as t(address)
    )
    ,excluded as (
    select lower(address) as address from (
    values
    ('0x7afa9d836d2fccf172b66622625e56404e465dbd') --phantom evm?


    ) as t(address)
    )
    ,data as (
    select
    block_timestamp::date as date,
    date_trunc('week', block_timestamp)::date as week,
    date_trunc('month', block_timestamp)::date as month,
    chain,
    amount_usd,
    origin_to_address, origin_from_address
    from (
    select block_timestamp, amount_usd, origin_to_address, origin_from_address, 'ETH' as chain
    from ethereum.core.ez_token_transfers
    where to_address in (select address from addresses)
    and origin_from_address not in (select address from excluded)
    and block_timestamp::date > '2024-02-26'
    and symbol not in ('Shiba 2.0', 'INNBC')
    union all
    select block_timestamp, amount_usd, origin_to_address, origin_from_address, 'ETH' as chain
    from ethereum.core.ez_native_transfers
    where to_address in (select address from addresses)
    and origin_from_address not in (select address from excluded)
    and block_timestamp::date > '2024-02-26'
    QueryRunArchived: QueryRun has been archived