Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/WITH tusdt AS (SELECTcall_block_time,'tUSDT' as asset,cast(output_0 as double) / 1000000 as total_borrow --USDT 6 digitFROM tenderfi_arbitrum.tUSDT_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tusdc as (SELECTcall_block_time,'tUSDC' as asset,cast(output_0 as double) / 1000000 as total_borrow --USDC 6 digitFROM tenderfi_arbitrum.tUSDC_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tdai as (SELECTcall_block_time,'tDAI' as asset,cast(output_0 as double) / 1e18 as total_borrow --DAI 18 digitFROM tenderfi_arbitrum.tDAI_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tfrax as (SELECTcall_block_time,'tFRAX' as asset,cast(output_0 as double) / 1e18 as total_borrow --FRAX 18 digitFROM tenderfi_arbitrum.tFRAX_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tglp as (SELECTcall_block_time,'tGLP' as asset,cast(output_0 as double) / 1e18 as total_borrow --GLP 18 digitFROM tenderfi_arbitrum.tGLP_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tgmx as (SELECTcall_block_time,'tGMX' as asset,cast(output_0 as double) / 1e18 as total_borrow --GMX 18 digitFROM tenderfi_arbitrum.tGMX_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),tuni as (SELECTcall_block_time,'tUNI' as asset,cast(output_0 as double) / 1e18 as total_borrow --UNI 18 digitFROM tenderfi_arbitrum.tUNI_call_totalBorrowsORDER BY call_block_time DESCLIMIT 1),teth as (SELECTcall_block_time,