Query editor
WITH original_inflation_CTE AS (SELECTepoch,inflation_Nest,burned_amount,SUM(burned_amount) OVER (ORDER BY epoch ASC) AS cumulative_burn,-- Sum of inflation_Nest from the previous 4 epochs (excluding current)SUM(inflation_Nest) OVER (ORDER BY epoch ASC -- Ensure chronological orderingROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS original_inflationFROM query_4735324)SELECTepoch,inflation_Nest,burned_amount,original_inflation,cumulative_burn,-- Calculate percentage burned with NULL handlingburned_amount / NULLIF(original_inflation, 0) AS perc_unclaimedFROM original_inflation_CTEORDER BY epoch DESC