Query editor
WITH daily_sums AS (selectevt_block_date,round(sum(fee)/1e18,2)feefrom(selectevt_block_date,sum(amount)feefromprobable_v1_bnb.ctfexchange_evt_feechargedwhere CAST(tokenId AS VARCHAR) = '0'group by 1unionselectevt_block_date,-sum(refund) feefromprobable_v1_bnb.feemodule_evt_feerefundedwhere CAST(id AS VARCHAR) = '0'group by 1)feegroup by 1)SELECTevt_block_date,fee,SUM(fee) OVER (ORDER BY evt_block_dateROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_feeFROM daily_sumsORDER BY evt_block_date DESC;