Query editor
withflows as (selectevt_block_time,evt_tx_hash,cast(0 as double) as pxeth,cast(value/1e18 as double) as pxeth_apxethfrom erc20_ethereum.evt_Transferwhere "to" = 0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6and contract_address = 0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6union allselectevt_block_time,evt_tx_hash,cast(0 as double) as pxeth,-cast(value/1e18 as double) as pxeth_apxethfrom erc20_ethereum.evt_Transferwhere "from" = 0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6and contract_address = 0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6union allselectevt_block_time,evt_tx_hash,cast(value/1e18 as double) as pxeth,cast(0 as double) as pxeth_apxethfrom erc20_ethereum.evt_Transferwhere "from" = 0x0000000000000000000000000000000000000000and contract_address = 0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6union allselectevt_block_time,evt_tx_hash,-cast(value/1e18 as double) as pxeth,cast(0 as double) as pxeth_apxethfrom erc20_ethereum.evt_Transferwhere "to" = 0x0000000000000000000000000000000000000000and contract_address = 0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6),summed as (selectevt_block_time,evt_tx_hash,sum(pxeth) as pxeth,sum(pxeth_apxeth) as pxeth_apxethfrom flowsgroup by evt_block_time, evt_tx_hash),cumulative as (select*,sum(pxeth) over(order by evt_block_time asc) as pxeth_cum,sum(pxeth_apxeth) over(order by evt_block_time asc) as pxeth_apxeth_cumfrom summed),price as (select