Query editor
select day, sum (balance) over (order by day) as balance -- h/t to MSilb7 for cracking this onefrom (select day, sum(transfer) as balancefrom (select date_trunc('day', block_time) as day, sum(-value/1e18) as transferfrom ethereum."traces"where "from" = 0xCBD6832Ebc203e49E2B771897067fce3c58575ac --Polygon Eth bridgeand (LOWER(call_type) not in ('delegatecall', 'callcode', 'staticcall') or call_type is null)and "tx_success" = trueand success = truegroup by 1union allselect date_trunc('day', block_time) as day, sum(value/1e18) as transferfrom ethereum."traces"where "to" = 0xCBD6832Ebc203e49E2B771897067fce3c58575ac --Polygon Eth bridgeand (LOWER(call_type) not in ('delegatecall', 'callcode', 'staticcall') or call_type is null)and "tx_success" = trueand success = truegroup by 1union all --gas costsselect date_trunc('day', block_time) as day, -SUM(gas_price*"gas_used")/1e18 as transferfrom ethereum."transactions"where "from" = 0xCBD6832Ebc203e49E2B771897067fce3c58575ac --Polygon Eth bridgegroup by 1) zgroup by 1order by 1) w