select profit_id ,profit_date ,profit ,sum(profit) over (order by profit_date) as cumulative_profit from daily_profits order by profit_date; 1)窗口函数SELECT <列>, 窗口函数() OVER ( [PARTITION BY <分区列>] [ORDER BY <排序列> [ASC|DESC]] [窗口框架] ) AS 别名FROM <表>2)一、聚合类窗口函数 SUM(), AVG(), MIN()...