Query editor
WITHdeposits AS (SELECTd.OnBehalfOf AS user,d.evt_tx_hash,d.reserve,CAST(amount AS DOUBLE),d.evt_block_time,'ethereum' AS blockchain,'ethereum_v3' AS market,'deposit' AS actionFROMaave_v3_ethereum.Pool_evt_Supply AS d),borrows AS (SELECTd.OnBehalfOf AS user,d.evt_tx_hash,d.reserve,CAST(amount AS DOUBLE),d.evt_block_time,'ethereum' AS blockchain,'ethereum_v3' AS market,'borrow' AS actionFROMaave_v3_ethereum.Pool_evt_Borrow AS d),repays AS (SELECTd.repayer AS user,d.evt_tx_hash,d.reserve,CAST(amount AS DOUBLE),d.evt_block_time,'ethereum' AS blockchain,'ethereum_v3' AS market,'repay' AS actionFROMaave_v3_ethereum.Pool_evt_Repay AS d),withdraws AS (SELECTd.user,d.evt_tx_hash,d.reserve,CAST(amount AS DOUBLE),d.evt_block_time,'ethereum' AS blockchain,'ethereum_v3' AS market,'withdraw' AS actionFROMaave_v3_ethereum.Pool_evt_Withdraw AS d),flashloans AS (SELECTd.initiator AS user,d.evt_tx_hash,d.asset AS reserve,CAST(amount AS DOUBLE),d.evt_block_time,