Query editor
WITH tvl AS(SELECTday,SUM(tvl) AS tvlFROM query_4602850GROUP BY 1),fees AS(SELECT day, SUM(fees) OVER (ORDER BY day) AS cumulative_feesFROM(selectday,sum(fees) as feesfrom query_4613775group by day))SELECTt.day,tvl / 1e6 AS tvl,SUM(cumulative_fees) / 1e6 AS cumulative_feesFROM tvl tLEFT JOIN fees f ON t.day = f.dayWHERE t.day >= TIMESTAMP '{{start_date}}'AND t.day <= TIMESTAMP '{{end_date}}'GROUP BY 1, 2ORDER BY 1 DESC