Query editor
WITH latest_price AS (SELECTtbill_usd_priceFROM query_7572340ORDER BY block_time DESCLIMIT 1),chain_balances AS (SELECT'Ethereum' AS chain,SUM(reconstructed_balance) AS outstanding_tbill,COUNT(*) AS holder_count_by_chainFROM query_7572060UNION ALLSELECT'Arbitrum' AS chain,SUM(reconstructed_balance) AS outstanding_tbill,COUNT(*) AS holder_count_by_chainFROM query_7571896UNION ALLSELECT'Solana' AS chain,SUM(reconstructed_balance) AS outstanding_tbill,COUNT(*) AS holder_count_by_chainFROM query_7570575UNION ALLSELECT'XRPL' AS chain,SUM(reconstructed_balance) AS outstanding_tbill,COUNT(*) AS holder_count_by_chainFROM query_7545055),chain_tvl AS (SELECTchain,outstanding_tbill,holder_count_by_chain,outstanding_tbill * (SELECT tbill_usd_price FROM latest_price) AS tvl_usd_by_chainFROM chain_balances),totals AS (SELECTSUM(tvl_usd_by_chain) AS total_tvl_usd,SUM(holder_count_by_chain) AS holder_count_totalFROM chain_tvl)SELECTchain,tvl_usd_by_chain,holder_count_by_chain,