Ali3NDistribution of $ARENA Airdrop Recipients By Holding Time ($ARENA Airdrop 16 March 2025)
    Updated 2025-03-17
    with claimrewardst as (
    select distinct tx_hash
    from avalanche.core.ez_decoded_event_logs
    where origin_to_address = '0xeffb809d99142ce3b51c1796c096f5b01b4aaec4'
    and event_name = 'Transfer'
    and origin_function_signature = '0x2e1a7d4d'
    and contract_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
    --and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    --and origin_from_address = decoded_log:to
    and decoded_log:value/1e18 = '0'
    and block_timestamp >= '2025-03-16 23:00:00.000'
    group by 1),

    claimerst as (
    select block_timestamp as claim_date,
    to_address as claimer,
    amount as Claimed_Amount
    from avalanche.core.ez_token_transfers t1
    where tx_hash in (select distinct tx_hash from claimrewardst)),

    staket as (
    select origin_from_address,
    sum (decoded_log:value/1e18) as Staked_Amount
    from avalanche.core.ez_decoded_event_logs t1 join claimerst t2 on t1.origin_from_address = t2.claimer and t1.decoded_log:value/1e18 <= t2.claimed_amount and t1.block_timestamp > t2.claim_date
    where origin_to_address = '0xeffb809d99142ce3b51c1796c096f5b01b4aaec4'
    and event_name = 'Transfer'
    and origin_function_signature = '0xb6b55f25'
    and contract_address = '0xb8d7710f7d8349a506b75dd184f05777c82dad0c'
    and origin_from_address = decoded_log:from
    group by 1),

    unstaket as (
    select origin_from_address,
    sum (decoded_log:value/1e18) as UnStaked_Amount
    from avalanche.core.ez_decoded_event_logs t1 join claimerst t2 on t1.origin_from_address = t2.claimer and t1.decoded_log:value/1e18 <= t2.claimed_amount and t1.block_timestamp > t2.claim_date
    where origin_to_address = '0xeffb809d99142ce3b51c1796c096f5b01b4aaec4'
    Last run: about 1 month ago
    TYPE
    USERS
    1
    Staking430
    2
    Still Holding222
    3
    < 24 Hours90
    3
    57B
    12s