Query editor
WITH token_transfers AS (SELECT block_date, block_time, "from" AS sender, "to" AS recipient, amountFROM tokens.transfersWHERE blockchain = 'ethereum'AND block_date >= DATE '2026-06-01'AND contract_address = 0xad29f2723fcdbcf665f210f25e06f97477e417cfAND token_standard = 'erc20'),tracked_endpoints (wallet, endpoint_category) AS (VALUES(0x0af6b0b2f1e8b1a259fffc70f2c19e177e4638c4, 'Operational / MM / CEX staging'),(0x7a6acc2f3b87153b27b3de7b4ccec868ddd66ebc, 'Operational / MM / CEX staging'),(0xcd063f2f49dca053965f741f7e13e315420d8289, 'Operational / MM / CEX staging'),(0x3ee18b2214aff97000d974cf647e7c347e8fa585, 'Wormhole bridge')),endpoint_flows AS (SELECTt.block_date AS day,e.endpoint_category,t.amount AS delta_grvtFROM token_transfers tJOIN tracked_endpoints e ON t.recipient = e.walletUNION ALLSELECTt.block_date AS day,e.endpoint_category,-t.amount AS delta_grvtFROM token_transfers tJOIN tracked_endpoints e ON t.sender = e.wallet),daily AS (SELECTday,endpoint_category,SUM(delta_grvt) AS daily_net_flow_grvtFROM endpoint_flowsGROUP BY 1, 2)SELECTday,endpoint_category,ROUND(daily_net_flow_grvt, 2) AS daily_net_flow_grvt,ROUND(SUM(daily_net_flow_grvt) OVER (PARTITION BY endpoint_categoryORDER BY dayROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),2) AS endpoint_inventory_grvtFROM dailyORDER BY day, endpoint_category