Query editor
with latest_transfers AS (SELECT"to" AS current_holder,count(tokenId) as nfts_heldFROM (SELECTtokenId,"to",evt_block_time,ROW_NUMBER() OVER (PARTITION BY tokenId ORDER BY evt_block_time DESC) AS holder_rankFROM erc721_base.evt_TransferWHERE contract_address = 0x2bd7bf903a41d2fe857f68f1fbfae2a34786ba2c) rankedWHERE holder_rank = 1group by 1)selectcount(current_holder) as no_wallets,casewhen nfts_held = 1 then '1'when nfts_held > 1 and nfts_held < 5 then '2-4'when nfts_held >= 5 and nfts_held < 10 then '5+'when nfts_held >= 10 and nfts_held < 50 then '10+'when nfts_held >= 50 and nfts_held < 100 then '50+'when nfts_held >= 100 then '100+'end as categoryfrom latest_transfersgroup by 2