Query editor
WITH raw_events AS (-- Inflows (Deposits / Supply)SELECTevt_block_time AS time,'INFLOW (Supply)' AS action_type,"onBehalfOf" AS user_address,reserve AS token_address,CAST(amount AS DOUBLE) AS raw_amount,evt_tx_hash AS tx_hashFROM aave_horizon_ethereum.poolinstance_evt_supplyWHERE contract_address = 0xAe05Cd22df81871bc7cC2a04BeCfb516bFe332C8UNION ALL-- Outflows (Redemptions / Withdrawals)SELECTevt_block_time AS time,'OUTFLOW (Withdraw)' AS action_type,user AS user_address,reserve AS token_address,CAST(amount AS DOUBLE) AS raw_amount,evt_tx_hash AS tx_hashFROM aave_horizon_ethereum.poolinstance_evt_withdrawWHERE contract_address = 0xAe05Cd22df81871bc7cC2a04BeCfb516bFe332C8)SELECTr.time AS "Date & Time (UTC)",COALESCE(t.symbol, CAST(r.token_address AS VARCHAR)) AS "Asset",r.action_type AS "Flow Type",ROUND(r.raw_amount / POWER(10, COALESCE(t.decimals, 18)), 2) AS "Token Amount",CAST(r.user_address AS VARCHAR) AS "User Address",CAST(r.tx_hash AS VARCHAR) AS "Transaction Hash"FROM raw_events rLEFT JOIN tokens.erc20 tON r.token_address = t.contract_addressAND t.blockchain = 'ethereum'WHERE UPPER(COALESCE(t.symbol, '')) IN ('USYC', 'JTRSY')ORDER BY r.time ASC;