我有一个每月每个交易日的销售预算。因此,第 1 天的预算为 300,第 2 天的预算为 400,然后当月至今的预算为 700。我在查询中收到此错误: Incorrect syntax near 'ROWS'.
select
TradingDate
,Budget
,sum(Budget) over (PARTITION BY TradingDate
order by TradingDate asc
ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING),1) AS BudgetMTD
from #4