{
  "kind": "illustrative_sql_example",
  "reference_validation": "Both states are checked with SQLite against the model and customer-scoped read. These sample values are not a recorded Eddy run or performance measurement.",
  "currency": "CAD",
  "account_id": 42,
  "month": "2026-03-01",
  "reporting_period": "March 1–31, 2026",
  "model_sql": "select account_id, month, location,\n       sum(amount) as refunded\nfrom refunds\ngroup by account_id, month, location",
  "read_sql": "select location, refunded\nfrom refunds_by_location\nwhere account_id = $1 and month = $2\norder by refunded desc, location",
  "read_parameters": [42, "2026-03-01"],
  "source_rows": [
    {"refund_id": 101, "account_id": 42, "month": "2026-03-01", "refunded_at": "2026-03-08", "location": "Burnaby", "amount": 4800},
    {"refund_id": 102, "account_id": 42, "month": "2026-03-01", "refunded_at": "2026-03-11", "location": "Burnaby", "amount": 1200},
    {"refund_id": 103, "account_id": 42, "month": "2026-03-01", "refunded_at": "2026-03-15", "location": "Vancouver", "amount": 6200},
    {"refund_id": 104, "account_id": 42, "month": "2026-03-01", "refunded_at": "2026-03-20", "location": "North Vancouver", "amount": 1400},
    {"refund_id": 105, "account_id": 99, "month": "2026-03-01", "refunded_at": "2026-03-18", "location": "Burnaby", "amount": 99900},
    {"refund_id": 106, "account_id": 42, "month": "2026-04-01", "refunded_at": "2026-04-01", "location": "Burnaby", "amount": 80000}
  ],
  "correction": {
    "refund_id": 102,
    "previous_amount": 1200,
    "corrected_amount": 3600,
    "source_persisted_at": "2026-04-02T10:00:00Z"
  },
  "states": {
    "before": {
      "label": "Before correction",
      "source_position": "April 2, 09:59 UTC",
      "rows": [{"location": "Vancouver", "refunded": 6200}, {"location": "Burnaby", "refunded": 6000}, {"location": "North Vancouver", "refunded": 1400}],
      "summary": "Before the correction, Vancouver has the most March refunds: $6,200 CAD."
    },
    "after": {
      "label": "After correction",
      "source_position": "April 2, 10:00 UTC",
      "rows": [{"location": "Burnaby", "refunded": 8400}, {"location": "Vancouver", "refunded": 6200}, {"location": "North Vancouver", "refunded": 1400}],
      "summary": "After the correction, Burnaby has the most March refunds: $8,400 CAD."
    }
  }
}
