{
  "diagnostics": {
    "attributes": {
      "consumerStage": "window_result",
      "field": "previousAmount",
      "safeToAutoRepair": false
    },
    "warnings": []
  },
  "engine": "java",
  "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))."
  },
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": false
}
