Query editor
with hhh as (selectevt_block_time as time,"from" as holder,-cast(value as int256) as lusdBalanceChange,null as lqtyBalanceChangefrom liquity_ethereum.LUSD_evt_Transferwhere "from" != 0x0000000000000000000000000000000000000000union allselectevt_block_time as time,to as holder,cast(value as int256) as lusdBalanceChange,null as lqtyBalanceChangefrom liquity_ethereum.LUSD_evt_Transferwhere to != 0x0000000000000000000000000000000000000000union allselectevt_block_time as time,"from" as holder,null as lusdBalanceChange,-cast(value as int256) as lqtyBalanceChangefrom liquity_ethereum.LQTYToken_evt_Transferwhere "from" != 0x0000000000000000000000000000000000000000union allselectevt_block_time as time,to as holder,null as lusdBalanceChange,cast(value as int256) as lqtyBalanceChangefrom liquity_ethereum.LQTYToken_evt_Transferwhere to != 0x0000000000000000000000000000000000000000),hh as (selecttime,holder,sum(lusdBalanceChange) over (partition by holderorder by time) as lusdBalance,sum(lqtyBalanceChange) over (partition by holderorder by time) as lqtyBalancefrom hhh),h as (select