Monitize AIPirate Nation retention final 1 copy
    Updated 2024-07-15
    with claims as(
    SELECT
    distinct TO_ADDRESS as claimant_wallet,
    min(Block_timestamp::date) as claimed_date,
    sum(amount) as Claimed_Amount
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    and FROM_ADDRESS in ('0x3db08a08434bfb774271e46d277468f8da0da144')
    and ORIGIN_FUNCTION_SIGNATURE = '0xf0fd1084'
    group by 1
    order by 3 desc
    ),
    /*
    balancet as (
    SELECT
    user_address as holder,
    current_bal as Holding_Volume
    from ethereum.core.ez_current_balances
    join claims on user_address = claimant_wallet
    where CONTRACT_ADDRESS = lower('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    and current_bal > 0
    ),*/

    stakert as (
    select
    distinct FROM_ADDRESS as staker,
    TX_HASH as stake_tx,
    BLOCK_TIMESTAMP as stake_date,
    AMOUNT as stake_amount
    from ethereum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0x63696Fc66795B51d02c1590b536484A41fbDDF9a')
    and TO_ADDRESS = lower('0x7ff3fc53e1Cb5E187a7d98aCc61367e2623694D3')
    ),

    cext as (
    select
    QueryRunArchived: QueryRun has been archived