Query editor
with-- get tyb collection holderscollection_list as (selecttx_hash,varbinary_substring(data,13,20) as collection_addressfromavalanche_c.logswherecontract_address=0x5ffb513e7653e24bb7c7d3effe2fa27b20edcb13 and topic0=0x0932763e5a18f9be5bc3fb4ab7811741698b07a6b017eed8f9e6e0c5738f28ce),tb as (select *from (selectblock_time,varbinary_substring(topic1, 13, 20) as from_address,varbinary_substring(topic2, 13, 20) as to_address,contract_address,varbinary_to_uint256(topic3) as token_idfromavalanche_c.logswhere1=1and contract_address in (select collection_address from collection_list)and topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand tx_to=0x669b9f4ba20e1bc8283dfbd8224acf382a5795a9)where from_address=0x0000000000000000000000000000000000000000),wallet_collection_list as (selectcontract_address,to_address as user_addressfromtb),-- get wallets for each collectionwallet_collection_count as (selectuser_address,count(distinct contract_address) as collection_countfromwallet_collection_listgroup byuser_address)selectcount(distinct user_address) as user_count,contract_address,contract_name,user_typefrom (selectuser_address,contract_address,