Query editor
WITH oracle_price AS (SELECTl.contract_address,'AnswerUpdated' AS event_name,l.block_time,l.block_number,l.tx_hash,l.topic0 AS event_signature,bytearray_to_uint256(bytearray_substring(l.topic1, 1, 32)) AS current,bytearray_to_uint256(bytearray_substring(l.topic2, 1, 32)) AS roundId,bytearray_to_uint256(bytearray_substring(data, 1, 32)) AS publishTimeFROM base.logs lWHERE l.topic0 = 0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5fAND l.contract_address = 0x6f9829A2278A5b017b6e997E2BafCDbCb8d6Bc04)SELECTFROM_UNIXTIME(publishTime) AS datetime,block_number,AVG(current / 1e18) AS priceFROM oracle_priceGROUP BY 1, 2