Query editor
SELECTDATE_TRUNC('day', block_date) AS month,SUM(amount_usd) * 0.00875 AS swap_revenue_bull, /* service fee of 0.875% (Variable fee ranging from .3% to .875%) */SUM(SUM(amount_usd) * 0.00875) OVER (ORDER BY DATE_TRUNC('day', block_date)) AS cumulative_swap_revenue_bullFROM dex.tradesWHERE tx_to = 0x881D40237659C251811CEC9c364ef91dC08D300CAND block_date >= CAST('2023-04-01' AS TIMESTAMP)AND block_date <= CAST('2023-04-30' AS TIMESTAMP)GROUP BY 1