Query editor
--POP Holders holding matic greater than 0withnaoda_holders (address) as (SELECT DISTINCTto AS holderFROMerc1155_polygon.evt_TransferSingleWHEREcontract_address = 0xA9AfA77d0D960735BBac48782947F8E86f24C87A),matic_transfer_raw as (select"from" as address,(-1) * cast(value as decimal (38, 0)) as amountfrompolygon.traceswherecall_type = 'call'and success = trueand value > uint256 '0'and "from" is not nulland "to" is not nullunion allselect"to" as address,cast(value as decimal (38, 0)) as amountfrompolygon.traceswherecall_type = 'call'and success = trueand value > uint256 '0'and "from" is not nulland "to" is not nullunion allselect"from" as address,(-1) * cast(gas_price as double) * gas_used as amountfrompolygon.transactionswheresuccess = true),matic_balance as (selectaddress,sum(amount) as balance_amountfrommatic_transfer_rawwhereaddress is not null -- exclude the null address dataand address in (selectaddressfromnaoda_holders)group by1)