rezarwzAnalysis of Selling and Transferring in Users Holding Less Than 95% of Initial
    Updated 2024-06-26
    -- forked from Analysis of Selling and Transferring in Users Holding Less Than 95% of Initial Claimed Tokens @ https://flipsidecrypto.xyz/edit/queries/e492013e-a533-41f8-b50d-9747d043fd80
    with all_claims as (
    SELECT
    tx.TX_HASH,
    tx.block_timestamp as block_timestamp,
    tr.to_Address as ua,
    AMOUNT
    FROM
    blast.core.fact_transactions tx
    INNER join blast.core.ez_token_transfers tr on tx.tx_hash = tr.tx_hash
    and tr.contract_address = lower('0xb1a5700fA2358173Fe465e6eA4Ff52E36e88E2ad')
    and tx.ORIGIN_FUNCTION_SIGNATURE != '0xca1d209d'
    WHERE
    tx.status = 'SUCCESS'
    ),
    now_balance as (
    SELECT
    ua,
    sum(am) as current_balance
    FROM
    (
    SELECT
    from_Address as ua,
    - amount as am
    FROM
    blast.core.ez_token_transfers
    WHERE
    contract_address = lower('0xb1a5700fA2358173Fe465e6eA4Ff52E36e88E2ad')
    union
    all
    SELECT
    to_Address as ua,
    amount as am
    FROM
    blast.core.ez_token_transfers
    WHERE
    QueryRunArchived: QueryRun has been archived