Query editor
WITH transfers AS (SELECTblock_number,block_time,"from","to",value/1e18 as amount_eth,CASEWHEN "to" = 0xeb4e16c804AE9275a655AbBc20cD0658A91F9235 THEN value/1e18ELSE -value/1e18END as net_amountFROM base.tracesWHERE ("to" = 0xeb4e16c804AE9275a655AbBc20cD0658A91F9235OR "from" = 0xeb4e16c804AE9275a655AbBc20cD0658A91F9235)AND success = trueAND (call_type NOT IN ('delegatecall', 'callcode', 'staticcall') OR call_type IS NULL)AND value > 0),balance_snapshots AS (SELECTblock_time,net_amount,SUM(net_amount) OVER (ORDER BY block_number) as point_in_time_balanceFROM transfers)SELECTROUND(MAX(point_in_time_balance), 4) as "ATH Rewards Balance (ETH)",ROUND((SELECT point_in_time_balanceFROM balance_snapshotsORDER BY block_time DESCLIMIT 1), 4) as "Current Rewards Balance (ETH)",(SELECT block_timeFROM balance_snapshotsWHERE point_in_time_balance = (SELECT MAX(point_in_time_balance) FROM balance_snapshots)LIMIT 1) as "ATH Timestamp"FROM balance_snapshots;