Query editor
WITH all_order_fills AS (SELECTevt_block_time,evt_tx_hashFROM predict_bnb.ctfexchange_evt_orderfilledUNION ALLSELECTevt_block_time,evt_tx_hashFROM predict_bnb.negriskctfexchange_evt_orderfilled),daily_tx AS (SELECTDATE_TRUNC('day', evt_block_time) AS day,COUNT(DISTINCT evt_tx_hash) AS daily_transactionsFROM all_order_fillsWHERE evt_block_time < DATE_TRUNC('day', CURRENT_DATE)GROUP BY 1)SELECTday,daily_transactions,SUM(daily_transactions) OVER (ORDER BY dayROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_transactionsFROM daily_txORDER BY day DESC;