Query editor
with steth_price as (select minute,price as steth_price from prices.usdwhere blockchain = 'ethereum'and symbol = 'stETH')select deposits.day_ts, deposits.user_str, total_daily_eusd_amount,total_daily_steth_amount, steth_price, total_daily_steth_amount * steth_price as total_daily_steth_usd_amount,case when total_daily_eusd_amount <= 0 then 10000 -- If no borrows, collatereal rate is inf, however we set it to 10000 hereelse ((total_daily_steth_amount * steth_price * 100)/total_daily_eusd_amount) end as collateral_ratefrom query_2692938 depositsleft join query_2692981 borrowson deposits.day_ts = borrows.day_tsand deposits.user_str = borrows.user_strleft join steth_priceon deposits.day_ts = steth_price.minutewhere total_daily_eusd_amount >= 0 and total_daily_steth_amount >= 0order by deposits.day_ts desc