Monitize AIPirate 1 copy
    Updated 2024-07-15
    with claimt as (
    select
    date_trunc('day', BLOCK_TIMESTAMP) as dates,
    count(distinct to_ADDRESS) as users,
    sum(amount) as claimed_amount,
    sum(amount_usd) as claim_usd_amt
    from ethereum.core.ez_token_transfers
    where contract_address = lower('0x7613c48e0cd50e42dd9bf0f6c235063145f6f8dc')
    and FROM_ADDRESS = lower('0x543ba3e063197b3025a4b2751e9b4b6a2489fa07')
    --and ORIGIN_FUNCTION_SIGNATURE = '0x2e7ba6ef'
    group by 1
    )


    select
    dates,
    ifnull(claimed_amount,0) as claimed_amount,
    ifnull(users,0) as claimers,
    sum(ifnull(claimed_amount,0)) over(order by dates asc) as cum_claimed_amount,
    150000000 - sum(ifnull(claimed_amount,0)) over(order by dates asc) as cum_unclaimed_amount,
    sum(ifnull(users,0)) over(order by dates asc) as cum_claimers
    from claimt
    order by 1 asc








    QueryRunArchived: QueryRun has been archived