Query editor
WITH movements AS (-- depositsSELECTcall_block_date AS day,CAST(output_0 AS DECIMAL(38,0)) / 1e18 AS amount,'deposit' AS typeFROM etherfiliquiditypool_ethereum.liquiditypool_call_depositWHERE call_success = trueUNION ALL-- withdrawalsSELECTcall_block_date AS day,CAST(_amount AS DECIMAL(38,0)) / 1e18 AS amount,'withdraw' AS typeFROM etherfiliquiditypool_ethereum.liquiditypool_call_withdrawWHERE call_success = true)SELECTday,SUM(CASE WHEN type = 'deposit' THEN amount ELSE 0 END) AS eth_deposited,SUM(CASE WHEN type = 'withdraw' THEN amount ELSE 0 END) AS eth_withdrawn,SUM(CASE WHEN type = 'deposit' THEN amount ELSE -amount END) AS net_ethFROM movementsGROUP BY dayORDER BY day;