Query editor
SELECTreth_arb.hour as timestamp-- Arbitrum-- , COALESCE(reth_arb.value, 0) as tvl_reth_arb-- , COALESCE(reth_arb.loan, 0) as borrow_reth_arb-- , COALESCE(wsteth_arb.value, 0) as tvl_wsteth_arb-- , COALESCE(wsteth_arb.loan, 0) as borrow_wsteth_arb-- , COALESCE(sfrxeth_arb.value, 0) as tvl_sfrxeth_arb-- , COALESCE(sfrxeth_arb.loan, 0) as borrow_sfrxeth_arb-- , COALESCE(weeth_arb.value, 0) as tvl_weeth_arb-- , COALESCE(weeth_arb.loan, 0) as borrow_weeth_arb-- , COALESCE(weth_arb.value, 0) as tvl_weth_arb-- , COALESCE(weth_arb.loan, 0) as borrow_weth_arb, COALESCE(reth_arb.value, 0)+ COALESCE(wsteth_arb.value, 0)+ COALESCE(sfrxeth_arb.value, 0)+ COALESCE(weeth_arb.value, 0)+ COALESCE(weth_arb.value, 0)as supply_tvl_usd, COALESCE(reth_arb.loan, 0)+ COALESCE(wsteth_arb.loan, 0)+ COALESCE(sfrxeth_arb.loan, 0)+ COALESCE(weeth_arb.loan, 0)+ COALESCE(weth_arb.loan, 0)as borrow_tvl_usd-- , (COALESCE(reth_arb.value, 0)-- + COALESCE(wsteth_arb.value, 0)-- + COALESCE(sfrxeth_arb.value, 0)-- + COALESCE(weeth_arb.value, 0)-- + COALESCE(weth_arb.value, 0))-- - (COALESCE(reth_arb.loan, 0)-- + COALESCE(wsteth_arb.loan, 0)-- + COALESCE(sfrxeth_arb.loan, 0)-- + COALESCE(weeth_arb.loan, 0)-- + COALESCE(weth_arb.loan, 0)), NULL -- Not applicable for CDP's where the borrowed asset is minted (ie. GRAI)as available_tvl_usdfrom query_2840294 reth_arbjoin query_2840329 wsteth_arb on reth_arb.hour = wsteth_arb.hourjoin query_3086352 sfrxeth_arb on reth_arb.hour = sfrxeth_arb.hourjoin query_3476693 weeth_arb on reth_arb.hour = weeth_arb.hourjoin query_3086212 weth_arb on reth_arb.hour = weth_arb.hourWHERE reth_arb.hour >= cast('{{timestamp}}' as TIMESTAMP)order by 1 desc