Query editor
with liquidations as (select evt_tx_hash, evt_tx_from, evt_block_time, to_unixtime(evt_block_time) as timestamp_num, evt_block_date, borrower, collateral, repaidUnits, seizedAssets / pow(10, t.decimals) as liquidated, t.symbol, id_ as market, callerfrom morpho_midnight_base.midnight_evt_liquidate ljoin tokens.erc20 ton l.collateral = t.contract_addressorder by evt_block_time desc),markets as (select evt_tx_hash, id_ as market, CAST(json_extract_scalar(market, '$.maturity') AS DOUBLE) as maturityfrom morpho_midnight_base.midnight_evt_marketcreated),joined as (select l.*, m.maturityfrom liquidations ljoin markets mon l.market = m.market)select distinct evt_block_time as liq_time, (timestamp_num - maturity) / 60 as liq_duration, liquidated, liquidated * price as liquidated_usd, j.symbol, evt_tx_hash, callerfrom joined jleft join prices_external.latest lon l.blockchain = 'base'and l.contract_address = j.collateralwhere timestamp_num >= maturityorder by liquidated_usd desc-- select *-- from prices_external.latest-- where blockchain = 'base'-- limit 10