Query editor
WITH target_collections AS (-- Pull your list from the source querySELECT collection_address, nameFROM query_6284594),current_item_state AS (-- Identify the current owner of each unique NFT item-- We use MAX_BY to grab the owner from the most recent eventSELECTnft_item_address,MAX_BY(owner_address, block_time) as owner,collection_addressFROM ton.nft_eventsWHERE collection_address IN (SELECT collection_address FROM target_collections)GROUP BY 1, 3)SELECTDISTINCT cis.owner AS holder_address-- COUNT(cis.nft_item_address) AS nfts_held,-- Join back to get the human-readable collection name-- ARRAY_AGG(DISTINCT tc.name) AS collections_heldFROM current_item_state cis--JOIN target_collections tc ON cis.collection_address = tc.collection_address--GROUP BY 1--ORDER BY 2 DESC