{
  "kind": "csv",
  "sample": "/agents/table-calcs-to-sql-window-functions/sample.csv",
  "question": "What is the cumulative revenue after each month?",
  "title": "Running Revenue",
  "prompt": "Translate the monthly running sum to a SQL window.",
  "flowLabel": "Worked example · authored synthetic data",
  "dimension": "Month",
  "measure": "Revenue",
  "definition": "{ FIXED [Region] : SUM([Revenue]) }",
  "expected": [
    [
      "2026-01",
      100
    ],
    [
      "2026-02",
      250
    ],
    [
      "2026-03",
      450
    ]
  ],
  "sql": "SELECT Month, SUM(SUM(Revenue)) OVER (ORDER BY Month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RunningRevenue FROM input GROUP BY Month ORDER BY Month",
  "requiredColumns": [
    "Month",
    "Revenue"
  ],
  "provenance": "Authored synthetic public sample; not customer data or host-integration proof"
}
