Query editor
with openCa as ((selectblockchain,tx_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 query_5328540where topic0 = 0x6e4927aac3383b13ffc5b6f44447693caf351f2f7ca800c9b4463b76997911b0)union allselect * from query_5210453),closeCa as (selectblockchain,tx_hash,block_time,from_hex('0x' || LOWER("RIGHT" (CAST(to_hex(CAST(topic1 AS varbinary)) AS varchar),40))) as owner,contract_address facadefrom query_5328540where topic0 = 0x460ad03b1cf79b1d64d3aefa28475f110ab66e84649c52bb41ed796b9b391981),creditAccounts as (selecto.blockchain,o.facade,o.creditAccount,o.owner,o.block_time open_time,MIN(c.block_time) as close_timefromopenCa oLEFT JOIN closeCa con c.owner = o.ownerand c.block_time >= o.block_timeand c.facade = o.facadegroup by1,