0xbidefiedge
    Updated 2023-05-24
    -- -- select
    -- -- case when FROM_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5') then FROM_ADDRESS else TO_ADDRESS end as target_address
    -- -- ,case when FROM_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5') then TO_ADDRESS else FROM_ADDRESS end as other_address
    -- -- ,case when FROM_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5') then 'OUT' else 'IN' end as driection
    -- -- ,case when CONTRACT_ADDRESS in ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2') then 'WETH' else 'USDC' end as symbol
    -- -- ,TOKEN_PRICE
    -- -- ,AMOUNT
    -- -- ,AMOUNT_USD
    -- -- -- ,BLOCK_TIMESTAMP
    -- -- ,TX_HASH
    -- -- -- ,*

    -- -- from ethereum.core.ez_token_transfers
    -- -- where CONTRACT_ADDRESS in ('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2','0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')
    -- -- and (FROM_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5') or TO_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5') )
    -- -- and ORIGIN_FUNCTION_SIGNATURE='0x05a10028'
    -- -- order by BLOCK_TIMESTAMP desc ,TX_HASH

    with target_tx as
    (
    SELECT
    a.TX_HASH as TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from
    (
    SELECT
    TX_HASH
    ,ORIGIN_FROM_ADDRESS
    from ethereum.core.fact_event_logs
    where ORIGIN_FROM_ADDRESS in ('0x354304234329a8d2425965c647e701a72d3438e5','0x6a9a595f0d2ccfe081b27b2630ffdc695bd434bd','0x66a12885f5df191e2b177e18bec643fe056d0d4d','0x76454f25aad744bb6aa824ce31f216fbeb9e05d8')
    and CONTRACT_ADDRESS='0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'
    group by 1,2
    ) a
    join
    (
    Run a query to Download Data