Query editor
select alloy_created.sum as "alloy_created",alloy_destroyed.sum as "alloy_destroyed",alloy_dao.sum as "alloy_dao",(alloy_created.sum - (alloy_dao.sum + alloy_destroyed.sum)) as "alloy_suplly"from(select bytearray_to_uint256(substr(data,1,32)) as "ALLOY",sum(bytearray_to_uint256(0x || substr(data,33,64))) as "sum"from polygon."logs"where contract_address = 0x4fdfc1b53fd1d80d969c984ba7a8ce4c7baad442and topic2 = 0x0000000000000000000000000000000000000000000000000000000000000000and substr(data,1,32) = 0x000000000000000000000000000000000000000000000000000000003b9aca00group by 1) alloy_created,(select bytearray_to_uint256(substr(data,1,32)) as "ALLOY",sum(bytearray_to_uint256(0x || substr(data,33,64))) as "sum"from polygon."logs"where contract_address = 0x4fdfc1b53fd1d80d969c984ba7a8ce4c7baad442and topic3 = 0x0000000000000000000000000000000000000000000000000000000000000000and substr(data,1,32) = 0x000000000000000000000000000000000000000000000000000000003b9aca00group by 1) alloy_destroyed,(select bytearray_to_uint256(substr(data,1,32)) as "ALLOY",sum(bytearray_to_uint256(0x || substr(data,33,64))) as "sum"from polygon."logs"where contract_address = 0x4fdfc1b53fd1d80d969c984ba7a8ce4c7baad442and topic3 = 0x0000000000000000000000006fb7e0aafba16396ad6c1046027717bca25f821fand substr(data,1,32) = 0x000000000000000000000000000000000000000000000000000000003b9aca00group by 1) alloy_dao