Query editor
WITH erc20info as (selectdecimals,contract_address,symbolfrom tokens.erc20WHERE blockchain = 'ethereum'),mc_tokens as (select"_poolTokenAddress" as ctoken,convert.asset_address as token,erc20info.symbolfrommorpho_compound_ethereum.Morpho_evt_MarketCreated as mjoin compound_v2_ethereum.ctokens as convert ON m."_poolTokenAddress" = convert.ctoken_addressjoin erc20info ON convert.asset_address = erc20info.contract_address),days as (selectdayfromUNNEST (SEQUENCE(cast('2023-01-01' as TIMESTAMP),cast(cast(cast(CURRENT_TIMESTAMP as TIMESTAMP) as TIMESTAMP) as TIMESTAMP),INTERVAL '1' day)) as _u (day)),variables as (select*fromdays,mc_tokens),borrow_index_tmp as ((select"borrowIndex" as borrow_apy,"evt_block_time" as time,"evt_index" as index,"contract_address" as ctokenfromcompound_v2_ethereum.CErc20Delegator_evt_AccrueInterestWHERE"evt_block_time" > cast('2023-01-01' as TIMESTAMP)AND "contract_address" IN (selectctokenfrommc_tokens))UNION(