Monitize AI$NRN Sellers after Claiming Date
    Updated 2024-07-15
    with claimert as(
    select
    distinct TO_ADDRESS as claimer,
    Block_timestamp as claim_date,
    amount as Claimed_Amount
    from arbitrum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0xdadeca1167fe47499e53Eb50F261103630974905')
    and FROM_ADDRESS = lower('0xb063f2af926af95f08515fd9d5f2397ce97148bf')
    and ORIGIN_FUNCTION_SIGNATURE = '0x2f0879f7'
    --group by 1
    ),

    total_claimt as (
    select
    /*date_trunc('day', BLOCK_TIMESTAMP) as date,
    sum(sum(amount)) over(order by date_trunc('day', BLOCK_TIMESTAMP) asc) as cum_claimed_amount*/
    sum(amount) as total_claimed
    from arbitrum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0xdadeca1167fe47499e53Eb50F261103630974905')
    and FROM_ADDRESS = lower('0xb063f2af926af95f08515fd9d5f2397ce97148bf')
    and ORIGIN_FUNCTION_SIGNATURE = '0x2f0879f7'
    ),

    balancet as (
    select
    distinct user_address,
    sum(volume) as Holding_Volume
    from(
    select
    from_address as user_address,
    -1 * amount as volume
    FROM arbitrum.core.ez_token_transfers
    where CONTRACT_ADDRESS = lower('0xdadeca1167fe47499e53Eb50F261103630974905')

    union all

    QueryRunArchived: QueryRun has been archived