Query editor
--Error: Unable to fully debug querySELECT address,SUM(amount) as total_balanceFROM (SELECTtr."from" AS address,-cast(tr.value as int256) AS amount -- assuming 18 decimalsFROM erc20_ethereum.evt_transfer trWHERE tr."from" != 0x0000000000000000000000000000000000000000 -- exclude mint/burn addressesAND contract_address = 0xa2c798f6456E4928f1E029C971007A09416A3db0 -- contract_address of the erc20 tokenUNION ALLSELECTtr."to" AS address,cast(tr.value as int256) AS amount -- assuming 18 decimalsFROM erc20_ethereum.evt_transfer trWHERE tr."to" != 0x0000000000000000000000000000000000000000 -- exclude mint/burn addressesAND contract_address = 0xa2c798f6456E4928f1E029C971007A09416A3db0 -- contract_address of the erc20 token) AS xGROUP BY addressHAVING SUM(amount) > CAST(0 AS INT256)ORDER BY total_balance DESCLIMIT 100 -- limit to top 100 holders