Query editor
with borrows AS (SELECT'borrow' AS action,chain,evt_block_time,evt_block_number,borrower AS user,contract_address AS vtoken_address,evt_tx_hash AS tx_hash,borrowAmount AS amount,NULL AS amount_vtokenFROM (SELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, borrowAmount FROM venus_bnb.VBNB_V2_evt_BorrowUNIONSELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, borrowAmount FROM venus_bnb.vbep20_bnb_core_evt_borrowUNION ALLSELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, borrowAmount FROM venus_bnb.vbep20delegate_evt_borrow WHERE contract_address IN (0x0c1da220d301155b87318b90692da8dc43b67340, 0xcc1db43a06d97f736c7b045aedd03c6707c09bdf) --two contracts that could not be carried over to the new tableUNION ALLSELECT chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, borrowAmount FROM venus_multichain.vtoken_evt_borrow) aWHERE borrowAmount > 0),repays AS (SELECT'repay' AS action,chain,evt_block_time,evt_block_number,borrower AS user,contract_address AS vtoken_address,evt_tx_hash AS tx_hash,repayAmount AS amount,NULL AS amount_vtokenFROM (SELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, repayAmount FROM venus_bnb.VBNB_V2_evt_repayborrowUNIONSELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, repayAmount FROM venus_bnb.vbep20_bnb_core_evt_repayborrowUNION ALLSELECT 'bnb' AS chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, repayAmount FROM venus_bnb.vbep20delegate_evt_repayborrow WHERE contract_address IN (0x0c1da220d301155b87318b90692da8dc43b67340, 0xcc1db43a06d97f736c7b045aedd03c6707c09bdf) --two contracts that could not be carried over to the new tableUNION ALLSELECT chain, evt_block_time, evt_block_number, borrower, contract_address, evt_tx_hash, repayAmount FROM venus_multichain.vtoken_evt_repayborrow) aWHERE repayAmount > 0),mints AS (SELECT'supply' AS action,chain,evt_block_time,evt_block_number,minter AS user,contract_address AS vtoken_address,evt_tx_hash AS tx_hash,mintAmount AS amount,mintTokens AS amount_vtokenFROM (SELECT 'bnb' AS chain, evt_block_time, evt_block_number, minter, contract_address, evt_tx_hash, mintAmount, mintTokens FROM venus_bnb.VBNB_V2_evt_mintUNION ALL