Query editor
with all_network_symbol as (select 'Tron' network, * from query_4074414union allselect 'Ethereum' network, * from query_4074416union allselect 'Polygon' network, * from query_4074420union allselect 'Optimism' network, * from query_4074438union allselect 'Avalanche' network, * from query_4074435union allselect 'BSC' network, * from query_4074434union allselect 'Arbitrum' network, * from query_4074431union allselect 'Base' network, * from query_4074429union allselect 'Solana' network, * from query_4074424),total_supply as (selectasset symbol,sum(balance) total_supplyfrom all_network_symbolwhere asset in ('DAI', 'USDe', 'FRAX') and dt = date(current_date)group by 1),yield_supply as (SELECT symbol, yield_supplyFROM (SELECT 'DAI' AS symbol, sDAI_staked AS yield_supplyFROM query_3895832WHERE date = (select max(date) from query_3895832 where sDAI_staked is not null)UNION ALLSELECT 'USDe' AS symbol, sUSDe_staked AS yield_supplyFROM query_3895832WHERE date = (select max(date) from query_3895832 where sUSDe_staked is not null)UNION ALLSELECT 'FRAX' AS symbol, sFRAX_staked AS yield_supplyFROM query_3895832WHERE date = (select max(date) from query_3895832 where sFRAX_staked is not null)) AS symbols)selectsymbol,yield_supply,total_supply,yield_supply/(yield_supply+total_supply) yield_portion,total_supply/(yield_supply+total_supply) stablecoin_portionfrom total_supplyleft join yield_supply using(symbol)union allselect 'Other' symbol, null yield_supply, null total_supply, 0 yield_portion, 1 stablecoin_portion