Query editor
WITH table1 AS (SELECT *FROM erc721_ethereum.evt_transfer),nft_trasfer AS (SELECT * FROM table1 WHERE contract_address = 0x5816c699f66592179A227C5C2FF8486243962951),to_cnt as(select"to",count(*) as cntfrom nft_trasfergroup by 1),from_cnt as(select"from",count(*) as cntfrom nft_trasfergroup by 1),holder as (select"to" as addr,t.cnt-coalesce(f.cnt, 0) as cntfrom to_cnt tleft join from_cnt f on t."to" = f."from")selectcnt as "count",count(*) as number_of_holdersfrom holderwhere cnt > 0group by 1order by 1