0xHaM-dLPing
    Updated 2023-03-11
    -- some psrt of SQL code is credied to: https://app.flipsidecrypto.com/velocity/queries/deb2208b-16c2-48d3-9528-423e592ab04b
    with eth_opti as (
    select block_timestamp,
    tx_hash,
    eth_from_address as origin_from_address,
    amount_usd
    from ethereum.core.ez_eth_transfers
    where eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    UNION ALL
    select block_timestamp,
    tx_hash,
    origin_from_address,
    amount_usd
    from ethereum.core.ez_token_transfers
    where to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
    )
    , SatelliteTb as (
    select block_timestamp,
    tx_hash,
    origin_from_address,
    topics[2] as User1,
    concat ('0x',right(user1,40)) as User_Address
    from ethereum.core.fact_event_logs
    where origin_to_address = '0x4f4495243837681061c4743b74b3eedf548d56a5'
    and contract_address != '0xce16f69375520ab01377ce7b88f5ba8c48f8d666' -- Squid
    and event_name is null
    and topics[2] is not null
    )
    , SquidTb as (
    select block_timestamp,
    tx_hash,
    origin_from_address as User_Address
    from ethereum.core.fact_event_logs
    where contract_address = '0x4f4495243837681061c4743b74b3eedf548d56a5'
    Run a query to Download Data