Query editor
SELECT "Date","Poly Net Profit (USD)","Arb Net Profit (USD)",SUM("Poly Net Profit (USD)") + SUM("Arb Net Profit (USD)") AS "Total Net Profit (USD)",SUM("Poly Net Profit (USD)" +"Arb Net Profit (USD)") OVER (ORDER BY "Date" ROWS BETWEEN 29 PRECEDING AND 0 FOLLOWING) as "30D Cumul Profit (USD)"from query_2428732 ALEFT JOIN query_2428733 USING ("Date")GROUP BY "Date", "Poly Net Profit (USD)","Arb Net Profit (USD)"ORDER BY "Date" DESC;