Monitize AITop $WELL Holders 2
    Updated 2024-07-10
    with claimert as(
    select
    distinct TO_ADDRESS as claimer,
    min(Block_timestamp::date) as claim_date,
    sum(amount) as Claimed_Amount
    from(
    SELECT
    distinct TO_ADDRESS,
    Block_timestamp,
    amount
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    and FROM_ADDRESS in ('0x3db08a08434bfb774271e46d277468f8da0da144')
    and ORIGIN_FUNCTION_SIGNATURE = '0xf0fd1084'

    UNION

    SELECT
    distinct TO_ADDRESS,
    Block_timestamp,
    amount
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    and FROM_ADDRESS in ('0x3df82eff8d4f92b380689fe723ce9e0511bdbbd4')
    and ORIGIN_FUNCTION_SIGNATURE = '0x675151b2'
    )
    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('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    QueryRunArchived: QueryRun has been archived