Query editor
WITH incoming AS (SELECTdecoded.to AS user_address,SUM(decoded.value) / 1e18 AS total_incomingFROM TABLE(DECODE_EVM_EVENT(abi => '{"anonymous": false,"inputs": [{"indexed": true,"internalType": "address","name": "from","type": "address"},{"indexed": true,"internalType": "address","name": "to","type": "address"},{"indexed": false,"internalType": "uint256","name": "value","type": "uint256"}],"name": "Transfer","type": "event"}',input => TABLE(SELECT*FROM viction.logs AS tWHEREt.contract_address = 0xC054751BdBD24Ae713BA3Dc9Bd9434aBe2abc1ce))) AS decodedGROUP BY decoded.to),outgoing AS (SELECTdecoded."from" AS user_address,SUM(decoded.value) / 1e18 AS total_outgoingFROM TABLE(DECODE_EVM_EVENT(abi => '{"anonymous": false,"inputs": [{"indexed": true,"internalType": "address","name": "from","type": "address"},{"indexed": true,"internalType": "address",