Query editor
with markets as (select market, expiry from query_5310351), pendle_txs as (select * from query_5311045), pendle as (select *from (selectp.market, expiry,casewhen token='SY' then 'SY-iUSD'when token='PT' then 'PT-iUSD'end as token,sum(amount) as amountfrom pendle_txs p join markets m on p.market=m.marketgroup by 1, 2, 3)wheremarket!=0x and amount>0 andmarket in (select market from markets) andtoken is not null)selectconcat('Pendle-', format_datetime(from_unixtime(expiry-86400),'dMMMyyyy')) as dex,token, amountfrom pendleorder by amount desc