[
  {
    "case": "04-lag-group-nested-sum",
    "phase": "query.validate",
    "error": {
      "code": "WINDOW_NESTED_AGGREGATE_UNSUPPORTED",
      "field": "previousAmount",
      "message": "WINDOW_NESTED_AGGREGATE_UNSUPPORTED: Nested aggregate/window syntax inside LAG is unsupported in calculatedFields.",
      "model": "ChinookInvoiceTimeQueryModel",
      "path": "calculatedFields[0].expression",
      "phase": "query.validate",
      "safeToAutoRepair": false,
      "suggestedNextAction": "Select the grouped aggregate with an alias, then use that alias as the window argument (for example lag(amount))."
    },
    "executionSkipped": "Validation rejected payload; no invalid execution attempted."
  }
]