Query editor
WITH p AS (SELECTdate_trunc('day', minute) as dt,AVG(price) as priceFROM prices.usdWHERE contract_address = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9AND blockchain = 'ethereum'GROUP BY 1),user_v3 AS (SELECTdate_trunc('day',evt_block_time) AS dt,onBehalfOf AS user_addressFROM aave_v3_ethereum.Pool_evt_SupplyUNION ALLSELECTdate_trunc('day',evt_block_time) AS dt,onBehalfOf AS user_addressFROM aave_v3_ethereum.Pool_evt_BorrowUNION ALLSELECTdate_trunc('day',evt_block_time) AS dt,repayer AS user_addressFROM aave_v3_ethereum.Pool_evt_RepayUNION ALLSELECTdate_trunc('day',evt_block_time) AS dt,user AS user_addressFROM aave_v3_ethereum.Pool_evt_WithdrawUNION ALLSELECTdate_trunc('day',evt_block_time) AS dt,initiator AS user_addressFROM aave_v3_ethereum.Pool_evt_FlashLoanUNION ALLSELECTdate_trunc('day',evt_block_time) AS dt,liquidator AS user_addressFROM aave_v3_ethereum.Pool_evt_LiquidationCall),user_all_min_date AS (SELECTuser_address,min(dt) as min_dtFROM user_v3GROUP BY user_address),