Query editor
-- 2026-11-21: source switched from matview dune.ondo_team.result_ondo_assets_price_history to the plain query_6750841-- (ondo_assets_price_history). The matview and its daily schedule were deleted (~0.3k credits/month);-- query_6750841 now runs inline (GM API http_get for all assets, ~10 credits). Logic unchanged.-- To go back: recreate the matview on 6750841 and swap query_6750841 back to dune.ondo_team.result_ondo_assets_price_history.with gm_px as (select symbol, max_by(price, day) price, max(day) px_day from query_6750841 where price is not null and day >= current_date - interval '14' day group by 1),sol_tokens (mint, product, px) as (select a.address_sol, 'GM', p.price from dune.ondo_team.result_ondo_assets a join gm_px p on p.symbol = a.symbol where a.address_sol is not null and a.symbol <> 'USDon'union all select 'A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6', 'USDY', 1.150928e0union all select 'i7u4r16TcsJTgq1kAG8opmVZyVnAKBwLKu6ZPMwzxNc', 'OUSG', 115.7e0),b as (select b.token_balance_owner wallet, t.product, b.token_balance * t.px usdfrom solana_utils.latest_balances b join sol_tokens t on t.mint = b.token_mint_addresswhere b.token_balance > 0 and b.token_balance_owner is not null),w as (select wallet, sum(usd) total_usd,sum(if(product='GM', usd, 0)) gm_usd, sum(if(product='OUSG', usd, 0)) ousg_usd, sum(if(product='USDY', usd, 0)) usdy_usdfrom b group by 1)select *, (select max(px_day) from gm_px) px_day, (select count(*) from w) n_wallets_all, (select sum(total_usd) from w) tvl_all from w where total_usd >= 1000 order by total_usd desc