Query editor
withaave_rates as (select*from (SELECTevt_block_date,liquidityRate/pow(10, 27)*100 as supply_apy,liquidityIndex,reserve,rank() over (partition by evt_block_date,reserve order by evt_block_time desc, evt_index desc) rankFROMaave_v3_ethereum.Pool_evt_ReserveDataUpdated rWHEREevt_block_time > cast('2025-01-01' as timestamp)and reserve = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)where rank = 1),token_evt as (selectevt_block_date,reserve,sum(amount) as daily_changesfrom (select evt_block_date, reserve, amount*pow(10,-6) as amountfrom aave_v3_ethereum.pool_evt_supplyunion allselect evt_block_date, reserve, amount*pow(10,-6)*-1 as amountfrom aave_v3_ethereum.pool_evt_withdrawunion allselect evt_block_date, collateralasset as reserve, liquidatedcollateralamount*pow(10,-6)*-1 as amountfrom aave_v3_ethereum.pool_evt_liquidationcallunion allselect evt_block_date, reserve, amountminted*pow(10,-6) as amountfrom aave_v3_ethereum.pool_evt_mintedtotreasury)where reserve = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48group byevt_block_date,reserve),token_supply as (selectevt_block_date,reserve,daily_changes,sum(daily_changes) over (order by evt_block_date asc) tvlfrom token_evtgroup byevt_block_date,reserve,daily_changes)selectevt_block_date,reserve,