Query editor
with market as (selectchain as blockchain,id,from_hex(json_value(marketParams, 'lax $.loanToken')) as borrow_token,from_hex(json_value(marketParams, 'lax $.collateralToken')) as collateral_tokenfrom morpho_blue_multichain.MorphoBlue_evt_CreateMarket)-- vaults_usr_exposure as (select distinct-- blockchain,-- id,-- address as market,-- collateral_token,-- collateral_token_symbol,-- borrow_token,-- borrow_token_symbol-- from dune.entropy_advisors.result_morpho_operations-- where upper(collateral_token_symbol) like '%USR%'-- and (blockchain, address) in (select distinct blockchain, collateral_token from market))selectevt_block_date,id,blockchain,address,collateral_token,collateral_token_symbol,borrow_token,borrow_token_symbol,sum(supply) as supply,sum(borrow) as borrow,sum(collateral) as collateral,sum(sum(supply)) over (partition by id, blockchain, address, collateral_token, borrow_token order by evt_block_date) as supply_cumulative,sum(sum(borrow)) over (partition by id, blockchain, address, collateral_token, borrow_token order by evt_block_date) as borrow_cumulative,sum(sum(collateral)) over (partition by id, blockchain, address, collateral_token, borrow_token order by evt_block_date) as collateral_cumulativefrom dune.entropy_advisors.result_morpho_operationswhere (upper(collateral_token_symbol) like '%USR%' or upper(collateral_token_symbol) like '%rlp%')and (blockchain, address) in (select distinct blockchain, collateral_token from market)group by 1, 2, 3, 4, 5, 6, 7, 8order by 1 desc