Query editor
with nft_in_holder AS (SELECT1 as amount,"to" AS holder,contract_addressFROM readon_arbitrum.Catto_evt_Transfer),nft_out_holder AS (SELECT-1 as amount,"from" AS holder,contract_addressFROM readon_arbitrum.Catto_evt_Transfer)SELECT count(holder) as unique_holders, FLOOR(AVG(amount)) as avg_amountFROM (SELECT holder,SUM(amount) as amount-- ,-- ROW_NUMBER() OVER (ORDER BY SUM(amount) DESC) as row_numFROM (SELECT holder, amountFROM nft_in_holderunion allSELECT holder, amountFROM nft_out_holder) as nft_netflowGROUP BY 1HAVING SUM(AMOUNT) > 0ORDER BY 2 DESC) as gbc_holders