Query editor
with e as (selectevt_block_time as time,100 * casewhen _baseRate / 1e18 > 0.045 then0.05else0.005 + _baseRate / 1e18end as borrowingRate,null as redeemedLUSDfrom liquity_ethereum.TroveManager_evt_BaseRateUpdatedunion allselectevt_block_time as time,null as borrowingRate,_actualLUSDAmount / 1e18 as redeemedLUSDfrom liquity_ethereum.TroveManager_evt_Redemption),g as (selectCAST(to_unixtime(time) AS INTEGER) / 3600 as time,MAX(borrowingRate) as borrowingRate,SUM(redeemedLUSD) as redeemedLUSDfrom egroup by 1),t as (-- select CAST(to_unixtime(NOW()) AS INTEGER) / 3600 - generate_series(0, 7 * 24 - 1) as timeSELECT CAST(to_unixtime(NOW()) AS INTEGER) / 3600 - timer as time FROM UNNEST(sequence(0,(7*24-1))) as t(timer))selectfrom_unixtime(t.time * 3600) as time,borrowingRate,redeemedLUSDfrom t left join g on t.time = g.timeorder by 1/* v1 codewith e as (select"evt_block_time" as "time",100 * casewhen "_baseRate" / 1e18 > 0.045 then0.05else0.005 + "_baseRate" / 1e18end as "borrowingRate",null::numeric as "redeemedLUSD"from liquity."TroveManager_evt_BaseRateUpdated"union allselect"evt_block_time" as "time",