Ali3NCurrent $ARENA Holding of Each Airdrop Recipient ($ARENA Airdrop 30 DEC 2024)
    Updated 2024-12-30
    -- forked from Current $ARENA Holding of Each Airdrop Recipient @ https://flipsidecrypto.xyz/studio/queries/bf95c669-6bd7-41b1-b118-44ce58627d15

    with claimerst as (
    select block_timestamp as claim_date,
    to_address as claimer,
    amount as Claimed_Amount
    from avalanche.core.ez_token_transfers
    where contract_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
    and from_address = '0x30f587903ef022774f5e35151e0e73c196bd755d'
    and block_timestamp > '2024-12-29 23:52:50.000'
    and origin_function_signature = '0x3b439351'),

    receivet as (
    select to_address as Receiver,
    sum (amount) as Received_Volume
    from avalanche.core.ez_token_transfers t1 join claimerst t2 on t1.to_address = t2.claimer and t1.block_timestamp > t2.claim_date
    where contract_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
    and block_timestamp > '2024-12-29 23:52:50.000'
    group by 1),

    sendt as (
    select from_address as sender,
    sum (amount) as sent_volume
    from avalanche.core.ez_token_transfers t1 join claimerst t2 on t1.from_address = t2.claimer and t1.block_timestamp > t2.claim_date
    where contract_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
    and block_timestamp > '2024-12-29 23:52:50.000'
    group by 1)

    select coalesce (t1.Receiver,t2.sender) as Wallet_Address,
    coalesce (Received_Volume, 0) - coalesce (sent_volume, 0) as Balance
    from receivet t1 full outer join sendt t2 on t1.receiver = t2.sender
    having balance > 0 order by balance desc



    /*staket as (
    QueryRunArchived: QueryRun has been archived