Monitize AI$Well Sellers after Claiming Date copy copy
    Updated 2024-07-10
    -- forked from $Well Sellers after Claiming Date copy @ https://flipsidecrypto.xyz/edit/queries/33b03f29-a323-41d0-927b-7c716c7ab233

    with claimert as(
    SELECT
    distinct TO_ADDRESS as claimer,
    min(Block_timestamp::date) as claim_date,
    sum(amount) as Claimed_Amount
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x24fcFC492C1393274B6bcd568ac9e225BEc93584')
    and FROM_ADDRESS in ('0x7ad4c1647aa947d1c05425a8d4d155ef811a5f9e')
    and ORIGIN_FUNCTION_SIGNATURE = '0x497de662'
    group by 1
    ),

    /*
    staket as (
    select
    distinct FROM_ADDRESS as staker,
    sum(amount) as staked_amount
    from ethereum.core.ez_token_transfers
    join claimert on FROM_ADDRESS = claimer
    where CONTRACT_ADDRESS = lower('0x24fcFC492C1393274B6bcd568ac9e225BEc93584')
    and TO_ADDRESS = lower('0x7ff3fc53e1Cb5E187a7d98aCc61367e2623694D3')
    group by 1
    ),*/

    balancet as (
    SELECT
    user_address as holder,
    current_bal as Holding_Volume
    from ethereum.core.ez_current_balances
    join claimert on user_address = claimer
    where CONTRACT_ADDRESS = lower('0x24fcFC492C1393274B6bcd568ac9e225BEc93584')
    and current_bal > 0
    ),

    QueryRunArchived: QueryRun has been archived