permaryuser re
    Updated 2025-03-19
    WITH nft_balances AS (
    SELECT
    holder,
    SUM(received) AS total_received,
    SUM(sent) AS total_sent
    FROM (
    -- Count received NFTs
    SELECT
    to_address AS holder,
    1 AS received,
    0 AS sent
    FROM ronin.core.ez_token_transfers
    WHERE contract_address = '0xf083289535052e8449d69e6dc41c0ae064d8e3f6'

    UNION ALL

    -- Count sent NFTs
    SELECT
    from_address AS holder,
    0 AS received,
    1 AS sent
    FROM ronin.core.ez_token_transfers
    WHERE contract_address = '0xf083289535052e8449d69e6dc41c0ae064d8e3f6'
    ) AS combined
    GROUP BY holder
    )
    SELECT
    holder,
    (total_received - total_sent) AS balance
    FROM nft_balances
    WHERE (total_received - total_sent) > 0 -- Filters out wallets with 0 balance
    ORDER BY balance DESC;

    Last run: about 1 month ago
    No Data to Display
    0
    2B
    2s