Query editor
/*ENS - Superfluid Stream Transaction HistoryShows every FlowUpdated event on ENS DAO streams with:- event_action: created / updated / cancelled- flow rate at time of event- cumulative USD streamed since stream inception (estimated)Cumulative is estimated by multiplying the flow rate of each periodby the duration of that period before the next change.*/WITHdao_wallets (address) AS (VALUES(0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7),(0xcf60916b6cb4753f58533808fa610fcbd4098ec0),(0x911143d946ba5d467bfc476491fdb235fef4d667)),recipient_labels (address, label) AS (VALUES(0xb162bf7a7fd64ef32b787719335d06b2780e31d1, 'ENS Labs (Superfluid receiver)')),-- All events from DAO streams on Ethereumflow_events AS (SELECTf.evt_block_time,f.evt_block_number,f.evt_index,f.evt_tx_hash,f.sender,f.receiver,f.token,CAST(f.flowRate AS DOUBLE) AS flow_rate_rawFROM superfluid_multichain.constantflowagreementv1_evt_flowupdated fINNER JOIN dao_wallets dw ON dw.address = f.senderWHERE f.chain = 'ethereum'),-- Classify each event and compute period durationevents_with_context AS (SELECTevt_block_time,evt_tx_hash,sender,receiver,token,flow_rate_raw,flow_rate_raw / 1e18 * 86400 AS usd_per_day,-- Previous flow rate for this streamLAG(flow_rate_raw) OVER (PARTITION BY sender, receiver, tokenORDER BY evt_block_number, evt_index) AS prev_flow_rate_raw,-- Next event time for calculating period durationLEAD(evt_block_time) OVER (PARTITION BY sender, receiver, token