Query editor
SELECTdate_trunc('{{Time interval}}', evt_block_time) as day,AVG(stableBorrowRate/1e27) AS Average_Borrow_APY_stable,AVG(variableBorrowRate/1e27) AS Average_Borrow_APY_variable,AVG(liquidityRate/1e27) AS Average_Supply_APY,AVG(stableBorrowRate/1e25) AS Average_Borrow_APY_stable_pct,AVG(variableBorrowRate/1e25) AS Average_Borrow_APY_variable_pct,AVG(liquidityRate/1e25) AS Average_Supply_APY_pctFROM aave_v2_ethereum.LendingPool_evt_ReserveDataUpdated depositsLEFT JOIN tokens.erc20 t ON deposits.reserve = t.contract_address and blockchain = 'ethereum'WHERE evt_block_time > now() - interval '{{Trading Num Days}}' dayAND symbol = '{{Symbol}}'GROUP BY 1ORDER BY 1 DESC