Query editor
WITH decoded_events AS (SELECT *FROM TABLE (decode_evm_event (abi => '{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"proposal","type":"bytes32"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"}',input => TABLE (SELECT *FROM zksync.logsWHERE contract_address = 0x5de7fe085ee66Fb48447e75AA8fb0598a080AEe0AND topic0 = 0x04eda370f8b8612fa7266d7ebbd41af9d694e19793fe9d9ff31b3ddbd99b08e1 -- "Withdrawn" event))))SELECT user, SUM(amount / 1e18) as total_amountFROM decoded_eventsGROUP BY userORDER BY total_amount DESCLIMIT 100;