Query editor
WITH cum_eth_deposited AS (SELECT date_trunc('day', block_time) AS c_withdrawal_time, SUM(SUM(value)/1e18) OVER (ORDER BY date_trunc('day', block_time) RANGE UNBOUNDED PRECEDING) AS cum_deposited_ethFROM ethereum.tracesWHERE "to" = 0x00000000219ab540356cBB839Cbe05303d7705FaAND successGROUP BY 1),cum_full_withdrawals AS (SELECT date_trunc('day', block_time) AS cf_withdrawal_time,SUM(SUM(amount)/1e9) OVER (ORDER BY date_trunc('day', block_time) RANGE UNBOUNDED PRECEDING) AS cum_full_eth_withdrawalsFROM ethereum.withdrawalsWHERE CAST(amount AS DOUBLE) > 20 * 1e9GROUP BY 1)SELECT c_withdrawal_time, SUM(cum_deposited_eth) - SUM(cum_full_eth_withdrawals) AS cum_eth_lockedFROM cum_eth_depositedLEFT JOIN cum_full_withdrawals ON c_withdrawal_time = cf_withdrawal_timeGROUP BY 1