Query editor
with openCa as ((selecttx_hash,block_time,from_hex('0x' || LOWER("RIGHT" (CAST(to_hex(CAST(topic2 AS varbinary)) AS varchar),40))) as owner,from_hex('0x' || LOWER("RIGHT" (CAST(to_hex(CAST(topic1 AS varbinary)) AS varchar),40))) as creditAccount,contract_address facadefrom optimism.logswhere topic0 = 0x6e4927aac3383b13ffc5b6f44447693caf351f2f7ca800c9b4463b76997911b0)),closeCa as (selecttx_hash,block_time,from_hex('0x' || LOWER("RIGHT" (CAST(to_hex(CAST(topic2 AS varbinary)) AS varchar),40))) as owner,contract_address facadefrom optimism.logswhere topic0 = 0x460ad03b1cf79b1d64d3aefa28475f110ab66e84649c52bb41ed796b9b391981),creditAccounts as (selecto.creditAccount,o.owner,o.block_time open_time,MIN(c.block_time) as close_time,o.facade-- pf.poolfromopenCa oLEFT JOIN closeCa con c.owner = o.ownerand c.block_time >= o.block_timeand c.facade = o.facadegroup by1,2,3,5)