SpecterEvent summ
    Updated 2024-09-08
    WITH RelayBlast AS (
    SELECT block_timestamp, tx_hash, 'Deposit' AS Type,
    from_address AS Sender, amount_usd
    FROM blast.core.ez_native_transfers
    where to_address = '0xf70da97812cb96acdf810712aa562db8dfa3dbef'
    and block_timestamp >='2024-01-01'

    union all

    SELECT block_timestamp, tx_hash, 'Withdraw' AS Type,
    to_address AS Sender, -amount_usd
    FROM blast.core.ez_native_transfers
    where from_address = '0xf70da97812cb96acdf810712aa562db8dfa3dbef'
    and block_timestamp >='2024-01-01'
    )

    SELECT type,
    count(DISTINCT tx_hash) AS Total_Transaction,
    SUM(Amount_usd) AS total_amount_usd
    FROM RelayBlast
    GROUP BY type
    QueryRunArchived: QueryRun has been archived