i_dan$TYBG: Total Holders -1
    Updated 2024-12-17
    WITH balance AS (
    SELECT
    to_address AS wallet
    , SUM(amount) AS balance
    FROM base.core.ez_token_transfers
    WHERE
    contract_address = lower('0x0d97F261b1e88845184f678e2d1e7a98D9FD38dE')
    GROUP BY 1
    UNION ALL
    SELECT
    from_address AS wallet
    , SUM(-amount) AS balance
    FROM base.core.ez_token_transfers
    WHERE
    contract_address = lower('0x0d97F261b1e88845184f678e2d1e7a98D9FD38dE')
    GROUP BY 1
    )--,

    --combined AS (
    SELECT
    wallet,
    SUM(balance) AS current_balance
    FROM balance
    GROUP BY wallet
    HAVING SUM(balance) > 0
    ORDER BY 2 DESC
    --)

    --SELECT
    -- COUNT(*) AS total_current_holders
    -- , SUM(current_balance) AS Total_Supply
    --FROM combined
    --WHERE current_balance > 0


    QueryRunArchived: QueryRun has been archived