Query editor
-- D1: Dune 8164884 rerun for the full window since endowment inception (Mar 2023), plus per-token breakdown.-- Same accounting basis: Steakhouse ledger accounts 32321* (investment P&L) + 32322* (rewards), excluding the one-off-- Aave USDS LM accrual which is spread daily Aug 2025 - Feb 2026 (145,411.34 USD / 210 days), exactly as in 8164884.with base as (select date_trunc('month', ts) as month, token_address, sum(amount) as booked_yieldfrom dune.steakhouse.result_ens_accounting_mainwhere wallet = '0x4f2083f5fbede34c2714affb3105539775f7fe64'and (cast(account as varchar) like '32321%' or cast(account as varchar) like '32322%')and transaction != 'ACCRUAL-LMREWARDS-AETHUSDS-1'and ts >= timestamp '2023-01-01'group by 1,2),lm as (select date_trunc('month', d) as month, sum(145411.33742432442/210) as lm_rewardfrom unnest(sequence(timestamp '2025-08-01', timestamp '2026-02-27', interval '1' day)) as t(d) group by 1)select coalesce(b.month, l.month) month, b.token_address, b.booked_yield as booked_yield_usd,case when b.token_address is null then l.lm_reward else 0 end as lm_reward_usdfrom base b full outer join lm l on b.month = l.month and b.token_address is nullunion allselect l.month, 'AAVE-USDS-LM-SPREAD' , 0, l.lm_reward from lm lorder by 1,2