{
  "run_id": "banking-models-b4d26ca0187a",
  "addendum_sha256": "c973128e712b6d4f051ad2efec25adbea2f0f764c8090452d73fa756984a06ea",
  "amendments": [
    {
      "path": "evals/models-protocol-amendment-1.json",
      "sha256": "19000e62245a5511c4ba85b59692cbf37557ba000ca8fc70ff6064ec9723e931"
    }
  ],
  "receipt_sha256": "e9cd5581c87148fcd4625f4919fea47b29df2f79ced58518dc89d6a59257d495",
  "three_arm_results_sha256": "11774003bc945d973e7fcb78f6cd232638964db55d8e7d1c0c398641b90b1fe7",
  "arms": {
    "bare": "Bare schema",
    "values": "Schema plus allowed values",
    "documented": "Full documentation"
  },
  "models": {
    "claude-sonnet-5-5": "Claude Sonnet 5.5",
    "claude-opus-5-5": "Claude Opus 5.5"
  },
  "reference": {
    "model": "gpt-4.1-mini-2025-04-14",
    "counts": {
      "bare": {
        "all": 27,
        "n": 40,
        "analytical": 27,
        "analytical_n": 36,
        "clarification": 0,
        "clarification_n": 4,
        "statuses": {
          "correct": 27,
          "unsupported_answer": 3,
          "wrong_answer": 9,
          "wrong_clarification": 1
        }
      },
      "documented": {
        "all": 33,
        "n": 40,
        "analytical": 33,
        "analytical_n": 36,
        "clarification": 0,
        "clarification_n": 4,
        "statuses": {
          "correct": 33,
          "execution_error": 2,
          "invalid_response": 1,
          "unsupported_answer": 3,
          "wrong_answer": 1
        }
      },
      "values": {
        "all": 31,
        "n": 40,
        "analytical": 31,
        "analytical_n": 36,
        "clarification": 0,
        "clarification_n": 4,
        "statuses": {
          "collection_error": 1,
          "correct": 31,
          "query_denied": 1,
          "unsupported_answer": 2,
          "wrong_answer": 4,
          "wrong_clarification": 1
        }
      }
    },
    "comparisons": [
      {
        "baseline": "bare",
        "treatment": "documented",
        "all": {
          "n": 40,
          "baseline_correct": 27,
          "treatment_correct": 33,
          "baseline_accuracy": 0.675,
          "treatment_accuracy": 0.825,
          "difference": 0.1499999999999999,
          "interval": [
            0.0,
            0.3
          ],
          "improved": 8,
          "regressed": 2
        },
        "analytical": {
          "n": 36,
          "baseline_correct": 27,
          "treatment_correct": 33,
          "baseline_accuracy": 0.75,
          "treatment_accuracy": 0.9166666666666666,
          "difference": 0.16666666666666663,
          "interval": [
            0.0,
            0.3333333333333333
          ],
          "improved": 8,
          "regressed": 2
        },
        "clarification": {
          "n": 4,
          "baseline_correct": 0,
          "treatment_correct": 0,
          "baseline_accuracy": 0.0,
          "treatment_accuracy": 0.0,
          "difference": 0.0,
          "interval": [
            0.0,
            0.0
          ],
          "improved": 0,
          "regressed": 0
        },
        "twin_clustered": {
          "all": {
            "n": 40,
            "clusters": 32,
            "largest_cluster": 2,
            "difference": 0.15,
            "interval": [
              0.0,
              0.3142857142857143
            ]
          },
          "analytical": {
            "n": 36,
            "clusters": 28,
            "largest_cluster": 2,
            "difference": 0.16666666666666666,
            "interval": [
              0.0,
              0.35135135135135137
            ]
          }
        }
      },
      {
        "baseline": "bare",
        "treatment": "values",
        "all": {
          "n": 40,
          "baseline_correct": 27,
          "treatment_correct": 31,
          "baseline_accuracy": 0.675,
          "treatment_accuracy": 0.775,
          "difference": 0.09999999999999998,
          "interval": [
            0.0,
            0.225
          ],
          "improved": 5,
          "regressed": 1
        },
        "analytical": {
          "n": 36,
          "baseline_correct": 27,
          "treatment_correct": 31,
          "baseline_accuracy": 0.75,
          "treatment_accuracy": 0.8611111111111112,
          "difference": 0.11111111111111116,
          "interval": [
            0.0,
            0.25
          ],
          "improved": 5,
          "regressed": 1
        },
        "clarification": {
          "n": 4,
          "baseline_correct": 0,
          "treatment_correct": 0,
          "baseline_accuracy": 0.0,
          "treatment_accuracy": 0.0,
          "difference": 0.0,
          "interval": [
            0.0,
            0.0
          ],
          "improved": 0,
          "regressed": 0
        },
        "twin_clustered": {
          "all": {
            "n": 40,
            "clusters": 32,
            "largest_cluster": 2,
            "difference": 0.1,
            "interval": [
              -0.02564102564102564,
              0.24324324324324326
            ]
          },
          "analytical": {
            "n": 36,
            "clusters": 28,
            "largest_cluster": 2,
            "difference": 0.1111111111111111,
            "interval": [
              -0.027777777777777776,
              0.2702702702702703
            ]
          }
        }
      },
      {
        "baseline": "values",
        "treatment": "documented",
        "all": {
          "n": 40,
          "baseline_correct": 31,
          "treatment_correct": 33,
          "baseline_accuracy": 0.775,
          "treatment_accuracy": 0.825,
          "difference": 0.04999999999999993,
          "interval": [
            -0.075,
            0.175
          ],
          "improved": 4,
          "regressed": 2
        },
        "analytical": {
          "n": 36,
          "baseline_correct": 31,
          "treatment_correct": 33,
          "baseline_accuracy": 0.8611111111111112,
          "treatment_accuracy": 0.9166666666666666,
          "difference": 0.05555555555555547,
          "interval": [
            -0.08333333333333333,
            0.19444444444444445
          ],
          "improved": 4,
          "regressed": 2
        },
        "clarification": {
          "n": 4,
          "baseline_correct": 0,
          "treatment_correct": 0,
          "baseline_accuracy": 0.0,
          "treatment_accuracy": 0.0,
          "difference": 0.0,
          "interval": [
            0.0,
            0.0
          ],
          "improved": 0,
          "regressed": 0
        },
        "twin_clustered": {
          "all": {
            "n": 40,
            "clusters": 32,
            "largest_cluster": 2,
            "difference": 0.05,
            "interval": [
              -0.075,
              0.175
            ]
          },
          "analytical": {
            "n": 36,
            "clusters": 28,
            "largest_cluster": 2,
            "difference": 0.05555555555555555,
            "interval": [
              -0.07894736842105263,
              0.1875
            ]
          }
        }
      }
    ]
  },
  "summaries": [
    {
      "model": "claude-sonnet-5-5",
      "repeats": [
        1,
        2,
        3
      ],
      "arms": {
        "bare": {
          "all": {
            "n": 40,
            "per_repeat": [
              35,
              35,
              35
            ],
            "mean_correct": 35.0
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              32,
              32,
              32
            ],
            "mean_correct": 32.0
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              3,
              3,
              3
            ],
            "mean_correct": 3.0
          },
          "statuses": {
            "correct": 105,
            "unsupported_answer": 3,
            "wrong_answer": 4,
            "wrong_clarification": 8
          },
          "questions_with_mixed_repeats": 0
        },
        "values": {
          "all": {
            "n": 40,
            "per_repeat": [
              37,
              37,
              37
            ],
            "mean_correct": 37.0
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              34,
              34,
              34
            ],
            "mean_correct": 34.0
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              3,
              3,
              3
            ],
            "mean_correct": 3.0
          },
          "statuses": {
            "correct": 111,
            "unsupported_answer": 3,
            "wrong_answer": 6
          },
          "questions_with_mixed_repeats": 0
        },
        "documented": {
          "all": {
            "n": 40,
            "per_repeat": [
              40,
              40,
              39
            ],
            "mean_correct": 39.666666666666664
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              36,
              36,
              36
            ],
            "mean_correct": 36.0
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              4,
              4,
              3
            ],
            "mean_correct": 3.6666666666666665
          },
          "statuses": {
            "correct": 119,
            "unsupported_answer": 1
          },
          "questions_with_mixed_repeats": 1
        }
      },
      "comparisons": [
        {
          "baseline": "bare",
          "treatment": "documented",
          "all": {
            "n": 40,
            "baseline_mean_correct": 35.0,
            "treatment_mean_correct": 39.666666666666664,
            "difference": 0.11666666666666667,
            "interval": [
              0.025,
              0.21666666666666665
            ],
            "questions_better": 5,
            "questions_worse": 0
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 32.0,
            "treatment_mean_correct": 36.0,
            "difference": 0.1111111111111111,
            "interval": [
              0.027777777777777776,
              0.2222222222222222
            ],
            "questions_better": 4,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 3.0,
            "treatment_mean_correct": 3.6666666666666665,
            "difference": 0.16666666666666666,
            "interval": [
              0.0,
              0.5
            ],
            "questions_better": 1,
            "questions_worse": 0
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.11666666666666667,
              "interval": [
                0.017094017094017092,
                0.24786324786324784
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.1111111111111111,
              "interval": [
                0.0,
                0.25
              ]
            }
          }
        },
        {
          "baseline": "bare",
          "treatment": "values",
          "all": {
            "n": 40,
            "baseline_mean_correct": 35.0,
            "treatment_mean_correct": 37.0,
            "difference": 0.05,
            "interval": [
              0.0,
              0.125
            ],
            "questions_better": 2,
            "questions_worse": 0
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 32.0,
            "treatment_mean_correct": 34.0,
            "difference": 0.05555555555555555,
            "interval": [
              0.0,
              0.1388888888888889
            ],
            "questions_better": 2,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 3.0,
            "treatment_mean_correct": 3.0,
            "difference": 0.0,
            "interval": [
              0.0,
              0.0
            ],
            "questions_better": 0,
            "questions_worse": 0
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.05,
              "interval": [
                0.0,
                0.13157894736842105
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.05555555555555555,
              "interval": [
                0.0,
                0.14705882352941177
              ]
            }
          }
        },
        {
          "baseline": "values",
          "treatment": "documented",
          "all": {
            "n": 40,
            "baseline_mean_correct": 37.0,
            "treatment_mean_correct": 39.666666666666664,
            "difference": 0.06666666666666667,
            "interval": [
              0.0,
              0.15
            ],
            "questions_better": 3,
            "questions_worse": 0
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 34.0,
            "treatment_mean_correct": 36.0,
            "difference": 0.05555555555555555,
            "interval": [
              0.0,
              0.1388888888888889
            ],
            "questions_better": 2,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 3.0,
            "treatment_mean_correct": 3.6666666666666665,
            "difference": 0.16666666666666666,
            "interval": [
              0.0,
              0.5
            ],
            "questions_better": 1,
            "questions_worse": 0
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.06666666666666667,
              "interval": [
                0.0,
                0.18333333333333332
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.05555555555555555,
              "interval": [
                0.0,
                0.17142857142857143
              ]
            }
          }
        }
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeats": [
        1,
        2,
        3
      ],
      "arms": {
        "bare": {
          "all": {
            "n": 40,
            "per_repeat": [
              37,
              37,
              34
            ],
            "mean_correct": 36.0
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              33,
              33,
              30
            ],
            "mean_correct": 32.0
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              4,
              4,
              4
            ],
            "mean_correct": 4.0
          },
          "statuses": {
            "correct": 108,
            "invalid_response": 2,
            "query_denied": 5,
            "wrong_clarification": 5
          },
          "questions_with_mixed_repeats": 8
        },
        "values": {
          "all": {
            "n": 40,
            "per_repeat": [
              39,
              40,
              39
            ],
            "mean_correct": 39.333333333333336
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              35,
              36,
              36
            ],
            "mean_correct": 35.666666666666664
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              4,
              4,
              3
            ],
            "mean_correct": 3.6666666666666665
          },
          "statuses": {
            "correct": 118,
            "invalid_response": 1,
            "unsupported_answer": 1
          },
          "questions_with_mixed_repeats": 2
        },
        "documented": {
          "all": {
            "n": 40,
            "per_repeat": [
              40,
              40,
              40
            ],
            "mean_correct": 40.0
          },
          "analytical": {
            "n": 36,
            "per_repeat": [
              36,
              36,
              36
            ],
            "mean_correct": 36.0
          },
          "clarification": {
            "n": 4,
            "per_repeat": [
              4,
              4,
              4
            ],
            "mean_correct": 4.0
          },
          "statuses": {
            "correct": 120
          },
          "questions_with_mixed_repeats": 0
        }
      },
      "comparisons": [
        {
          "baseline": "bare",
          "treatment": "documented",
          "all": {
            "n": 40,
            "baseline_mean_correct": 36.0,
            "treatment_mean_correct": 40.0,
            "difference": 0.1,
            "interval": [
              0.04166666666666667,
              0.17500000000000002
            ],
            "questions_better": 8,
            "questions_worse": 0
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 32.0,
            "treatment_mean_correct": 36.0,
            "difference": 0.1111111111111111,
            "interval": [
              0.04629629629629631,
              0.18518518518518523
            ],
            "questions_better": 8,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 4.0,
            "treatment_mean_correct": 4.0,
            "difference": 0.0,
            "interval": [
              0.0,
              0.0
            ],
            "questions_better": 0,
            "questions_worse": 0
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.1,
              "interval": [
                0.03174603174603175,
                0.1842105263157895
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.1111111111111111,
              "interval": [
                0.03508771929824562,
                0.20720720720720723
              ]
            }
          }
        },
        {
          "baseline": "bare",
          "treatment": "values",
          "all": {
            "n": 40,
            "baseline_mean_correct": 36.0,
            "treatment_mean_correct": 39.333333333333336,
            "difference": 0.08333333333333334,
            "interval": [
              0.025,
              0.15000000000000002
            ],
            "questions_better": 8,
            "questions_worse": 1
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 32.0,
            "treatment_mean_correct": 35.666666666666664,
            "difference": 0.10185185185185186,
            "interval": [
              0.03703703703703704,
              0.17592592592592593
            ],
            "questions_better": 8,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 4.0,
            "treatment_mean_correct": 3.6666666666666665,
            "difference": -0.08333333333333334,
            "interval": [
              -0.25,
              0.0
            ],
            "questions_better": 0,
            "questions_worse": 1
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.08333333333333334,
              "interval": [
                0.01666666666666667,
                0.16666666666666669
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.10185185185185186,
              "interval": [
                0.029411764705882353,
                0.19444444444444448
              ]
            }
          }
        },
        {
          "baseline": "values",
          "treatment": "documented",
          "all": {
            "n": 40,
            "baseline_mean_correct": 39.333333333333336,
            "treatment_mean_correct": 40.0,
            "difference": 0.01666666666666667,
            "interval": [
              0.0,
              0.04166666666666667
            ],
            "questions_better": 2,
            "questions_worse": 0
          },
          "analytical": {
            "n": 36,
            "baseline_mean_correct": 35.666666666666664,
            "treatment_mean_correct": 36.0,
            "difference": 0.00925925925925926,
            "interval": [
              0.0,
              0.027777777777777776
            ],
            "questions_better": 1,
            "questions_worse": 0
          },
          "clarification": {
            "n": 4,
            "baseline_mean_correct": 3.6666666666666665,
            "treatment_mean_correct": 4.0,
            "difference": 0.08333333333333334,
            "interval": [
              0.0,
              0.25
            ],
            "questions_better": 1,
            "questions_worse": 0
          },
          "twin_clustered": {
            "all": {
              "n": 40,
              "clusters": 32,
              "difference": 0.01666666666666667,
              "interval": [
                0.0,
                0.04385964912280702
              ]
            },
            "analytical": {
              "n": 36,
              "clusters": 28,
              "difference": 0.00925925925925926,
              "interval": [
                0.0,
                0.030303030303030304
              ]
            }
          }
        }
      ]
    }
  ],
  "failure_flags": {
    "rows": [
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B23",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B23",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B24",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B24",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B25",
        "arm": "bare",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [
          [
            "event_kind",
            "internal_transfer"
          ]
        ],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 1,
        "question_id": "B26",
        "arm": "bare",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [
          [
            "event_kind",
            "internal_transfer"
          ],
          [
            "status",
            "completed"
          ]
        ],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B23",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B23",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B24",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B24",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B25",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 2,
        "question_id": "B26",
        "arm": "bare",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [
          [
            "event_kind",
            "internal_transfer"
          ],
          [
            "status",
            "completed"
          ]
        ],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B23",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B23",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B24",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B24",
        "arm": "values",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B25",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-sonnet-5-5",
        "repeat": 3,
        "question_id": "B26",
        "arm": "bare",
        "status": "wrong_answer",
        "enum_literals_outside_domain": [
          [
            "event_kind",
            "internal_transfer"
          ],
          [
            "status",
            "completed"
          ]
        ],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 1,
        "question_id": "B20",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 1,
        "question_id": "B21",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 1,
        "question_id": "B36",
        "arm": "bare",
        "status": "invalid_response",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 1,
        "question_id": "B36",
        "arm": "values",
        "status": "invalid_response",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 2,
        "question_id": "B19",
        "arm": "bare",
        "status": "query_denied",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": true
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 2,
        "question_id": "B22",
        "arm": "bare",
        "status": "query_denied",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 2,
        "question_id": "B33",
        "arm": "bare",
        "status": "query_denied",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B20",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B21",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B22",
        "arm": "bare",
        "status": "wrong_clarification",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B24",
        "arm": "bare",
        "status": "query_denied",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B34",
        "arm": "bare",
        "status": "query_denied",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      },
      {
        "model": "claude-opus-5-5",
        "repeat": 3,
        "question_id": "B36",
        "arm": "bare",
        "status": "invalid_response",
        "enum_literals_outside_domain": [],
        "occurred_at_not_in_gold": false
      }
    ],
    "totals_over_repeats": {
      "claude-sonnet-5-5": {
        "values": {
          "incorrect_analytical": 6,
          "enum_value_guess": 0,
          "occurred_at_period": 0,
          "sql_error": 0
        },
        "bare": {
          "incorrect_analytical": 12,
          "enum_value_guess": 4,
          "occurred_at_period": 0,
          "sql_error": 0
        }
      },
      "claude-opus-5-5": {
        "bare": {
          "incorrect_analytical": 12,
          "enum_value_guess": 0,
          "occurred_at_period": 1,
          "sql_error": 5
        },
        "values": {
          "incorrect_analytical": 1,
          "enum_value_guess": 0,
          "occurred_at_period": 0,
          "sql_error": 0
        }
      }
    }
  },
  "acquisition": {
    "claude-sonnet-5-5": {
      "settings": {
        "max_tokens": 800,
        "thinking": {
          "type": "between_tools"
        },
        "effort": "medium"
      },
      "response_count": 360,
      "error_count": 0,
      "retried_requests": 0,
      "thinking_responses": 0,
      "stopped_at_ceiling": 0,
      "known_cost_usd": 2.5105,
      "unknown_cost_requests": 0,
      "input_tokens": 994380,
      "output_tokens": 52174
    },
    "claude-opus-5-5": {
      "settings": {
        "max_tokens": 800,
        "effort": "medium"
      },
      "response_count": 360,
      "error_count": 0,
      "retried_requests": 0,
      "thinking_responses": 203,
      "stopped_at_ceiling": 3,
      "known_cost_usd": 5.74616,
      "unknown_cost_requests": 0,
      "input_tokens": 994740,
      "output_tokens": 88360
    }
  },
  "outcomes": [
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS gross_card_spend_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS gross_card_spend_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS purchase_count FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' AND (s.purchase_count > 0 OR s.refund_count > 0 OR s.net_spend_minor <> 0) GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date <= DATE '2026-07-31' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) a LEFT JOIN accounts ac ON ac.currency = a.currency LEFT JOIN cards c ON c.account_id = ac.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) cur JOIN accounts a ON a.currency = cur.currency LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_amount_minor, r.refunded_minor FROM transactions p JOIN (SELECT related_transaction_id, SUM(amount_minor) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS total_refunded_july_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id AS transaction_id, p.amount_minor AS purchase_amount_minor, SUM(r.amount_minor) AS refunded_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT r.related_transaction_id) AS cnt FROM transactions r JOIN transactions p ON p.transaction_id = r.related_transaction_id WHERE r.event_kind = 'refund' AND r.currency = 'CAD' AND p.currency = 'CAD' AND p.event_kind = 'purchase' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD' AND r.currency = 'CAD'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor), 0) AS deposit_minor FROM transactions t WHERE t.event_kind = 'deposit' AND t.status = 'posted' AND t.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE currency='CAD' AND event_kind='deposit' AND status='posted' AND posted_at >= TIMESTAMP '2026-07-01' AND posted_at < TIMESTAMP '2026-08-01'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor), 0) AS withdrawal_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'withdrawal' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          757512
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND t.currency = 'USD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('deposit','withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          315630
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS volume_minor FROM transactions WHERE event_kind = 'internal_transfer' AND direction = 'debit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS transfer_volume_minor FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND currency = 'CAD' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor), 0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'internal_transfer' AND status = 'completed' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": []
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor),0) AS closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'USD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.opening_minor), 0) AS total_opening_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT SUM(ad.opening_minor) AS opening_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS total_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_cad_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'void' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchase_count > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchased_minor > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT o.currency AS currency, o.opening AS opening_minor, m.movement AS movement_minor, c.closing AS closing_minor FROM (SELECT currency, SUM(opening_minor) AS opening FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY currency) o JOIN (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY currency) m ON o.currency = m.currency JOIN (SELECT currency, SUM(closing_minor) AS closing FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY currency) c ON o.currency = c.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH opening AS (SELECT currency, SUM(opening_minor) AS opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY currency), movement AS (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY currency), closing AS (SELECT currency, SUM(closing_minor) AS closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY currency) SELECT o.currency, o.opening_minor, COALESCE(m.movement_minor, 0) AS movement_minor, c.closing_minor FROM opening o LEFT JOIN movement m ON o.currency = m.currency LEFT JOIN closing c ON o.currency = c.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, SUM(COALESCE(o.opening_minor, a.opening_balance_minor)) AS opening_minor, SUM(COALESCE(m.movement_minor, 0)) AS movement_minor, SUM(COALESCE(c.closing_minor, COALESCE(o.opening_minor, a.opening_balance_minor) + COALESCE(m.movement_minor, 0))) AS closing_minor FROM accounts a LEFT JOIN (SELECT account_id, opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01') o ON o.account_id = a.account_id LEFT JOIN (SELECT account_id, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY account_id) m ON m.account_id = a.account_id LEFT JOIN (SELECT account_id, closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31') c ON c.account_id = a.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS gross_card_spend_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS gross_card_spend_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS purchase_count FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON c.account_id = a.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date <= DATE '2026-07-31' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_cards FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) a LEFT JOIN accounts ac ON ac.currency = a.currency LEFT JOIN cards c ON c.account_id = ac.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(CASE WHEN c.card_status = 'active' THEN c.card_id END) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) cur JOIN accounts a ON a.currency = cur.currency LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id AS transaction_id, p.amount_minor AS purchase_amount_minor, r.refunded_minor AS refunded_minor FROM transactions p JOIN (SELECT related_transaction_id, SUM(amount_minor) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id AS transaction_id, p.amount_minor AS purchase_amount_minor, SUM(r.amount_minor) AS refunded_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS purchase_amount_minor, SUM(r.amount_minor) AS refunded_july_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT r.related_transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON p.transaction_id = r.related_transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND p.currency = 'CAD' AND p.event_kind = 'purchase' AND COALESCE(r.posted_at, r.occurred_at) >= TIMESTAMP '2026-07-01 00:00:00' AND COALESCE(r.posted_at, r.occurred_at) < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS cnt FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND direction = 'credit' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS withdrawal_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'withdrawal' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          757512
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND t.currency = 'USD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          315630
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS transfer_volume_minor FROM transactions WHERE event_kind = 'transfer' AND direction = 'debit' AND status = 'posted' AND currency = 'CAD' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor), 0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'internal_transfer' AND status = 'completed' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": []
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'USD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.opening_minor), 0) AS total_opening_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.opening_minor),0) AS opening_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS total_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS closing_balance_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date=DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'void' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchase_count > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchased_minor > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, SUM(CASE WHEN d.balance_date = DATE '2026-07-01' THEN d.opening_minor ELSE 0 END) AS opening_minor, SUM(d.posted_credit_minor - d.posted_debit_minor) AS movement_minor, SUM(CASE WHEN d.balance_date = DATE '2026-07-31' THEN d.closing_minor ELSE 0 END) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE d.balance_date >= DATE '2026-07-01' AND d.balance_date <= DATE '2026-07-31' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH july AS (SELECT account_id, currency, balance_date, opening_minor, posted_credit_minor, posted_debit_minor, closing_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31'), first_day AS (SELECT account_id, opening_minor FROM july WHERE balance_date = DATE '2026-07-01'), last_day AS (SELECT account_id, closing_minor FROM july WHERE balance_date = DATE '2026-07-31'), mv AS (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM july GROUP BY currency), op AS (SELECT a.currency AS currency, SUM(COALESCE(f.opening_minor, 0)) AS opening_minor FROM accounts a LEFT JOIN first_day f ON f.account_id = a.account_id GROUP BY a.currency), cl AS (SELECT a.currency AS currency, SUM(COALESCE(l.closing_minor, 0)) AS closing_minor FROM accounts a LEFT JOIN last_day l ON l.account_id = a.account_id GROUP BY a.currency) SELECT op.currency, op.opening_minor, COALESCE(mv.movement_minor, 0) AS movement_minor, cl.closing_minor FROM op JOIN cl ON cl.currency = op.currency LEFT JOIN mv ON mv.currency = op.currency ORDER BY op.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, SUM(COALESCE(o.opening_minor, 0)) AS opening_minor, SUM(COALESCE(m.movement_minor, 0)) AS movement_minor, SUM(COALESCE(c.closing_minor, 0)) AS closing_minor FROM accounts a LEFT JOIN (SELECT account_id, opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01') o ON o.account_id = a.account_id LEFT JOIN (SELECT account_id, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY account_id) m ON m.account_id = a.account_id LEFT JOIN (SELECT account_id, closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31') c ON c.account_id = a.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS gross_card_spend_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS gross_card_spend_minor FROM transactions WHERE event_kind='purchase' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_count FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 OR SUM(s.net_spend_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) > 0 OR SUM(s.refund_count) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id HAVING SUM(c.purchase_count) + SUM(c.refund_count) > 0 ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON c.account_id = a.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date <= DATE '2026-07-31' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND (purchase_count > 0 OR refund_count > 0) GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_date, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_cards FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) a LEFT JOIN accounts acc ON acc.currency = a.currency LEFT JOIN cards c ON c.account_id = acc.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency AS currency, COUNT(c.card_id) AS active_card_count FROM (SELECT DISTINCT currency FROM accounts) a2 JOIN accounts a ON a.currency = a2.currency LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id AS transaction_id, p.amount_minor AS original_amount_minor, r.refunded_minor AS refunded_july_minor FROM (SELECT related_transaction_id, SUM(amount_minor) AS refunded_minor FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) r JOIN transactions p ON p.transaction_id = r.related_transaction_id WHERE p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id AS transaction_id, p.amount_minor AS purchase_amount_minor, SUM(r.amount_minor) AS refunded_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS purchase_amount_minor, SUM(r.amount_minor) AS refunded_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.currency = 'CAD'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor), 0) AS deposit_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'deposit' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND direction='credit' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01' AND posted_at < TIMESTAMP '2026-08-01'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS total_minor FROM transactions WHERE event_kind='withdrawal' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'deposit' THEN amount_minor WHEN event_kind = 'withdrawal' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('deposit','withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          757512
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND t.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND t.currency = 'USD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('deposit','withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          315630
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS transfer_volume_minor FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND currency = 'CAD' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_answer",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'internal_transfer' AND status = 'completed' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": []
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad WHERE ad.currency = 'USD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'USD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.opening_minor), 0) AS total_opening_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.opening_minor),0) AS total_opening_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS total_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS closing_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor), 0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_cad_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'pending' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'void' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchase_count > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchased_minor > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT o.currency AS currency, o.opening_minor AS opening_minor, m.movement_minor AS movement_minor, c.closing_minor AS closing_minor FROM (SELECT currency, SUM(opening_minor) AS opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY currency) o JOIN (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY currency) m ON o.currency = m.currency JOIN (SELECT currency, SUM(closing_minor) AS closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY currency) c ON o.currency = c.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH o AS (SELECT currency, SUM(opening_minor) AS opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY currency), m AS (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY currency), c AS (SELECT currency, SUM(closing_minor) AS closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY currency) SELECT o.currency, o.opening_minor, COALESCE(m.movement_minor, 0) AS movement_minor, COALESCE(c.closing_minor, 0) AS closing_minor FROM o LEFT JOIN m ON o.currency = m.currency LEFT JOIN c ON o.currency = c.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH opening AS (SELECT currency, SUM(opening_minor) AS opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY currency), movement AS (SELECT currency, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY currency), closing AS (SELECT currency, SUM(closing_minor) AS closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY currency) SELECT o.currency, o.opening_minor, COALESCE(m.movement_minor, 0) AS movement_minor, c.closing_minor FROM opening o LEFT JOIN movement m ON m.currency = o.currency LEFT JOIN closing c ON c.currency = o.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT SUM(ad.closing_minor) AS total_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad WHERE ad.currency = 'CAD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-sonnet-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS gross_card_spend_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) AS refunded_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'purchase' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 OR SUM(s.purchased_minor) <> 0 OR SUM(s.refunded_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_spend_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_spend_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_spend_minor FROM card_spend_daily c JOIN accounts a ON c.account_id = a.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(s.net, 0) AS net_minor FROM accounts a LEFT JOIN (SELECT account_id, SUM(net_spend_minor) AS net FROM card_spend_daily WHERE spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND currency = 'CAD' GROUP BY account_id) s ON s.account_id = a.account_id WHERE a.currency = 'CAD' ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count) + SUM(refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count + refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_spend_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor WHEN t.event_kind = 'refund' THEN -t.amount_minor ELSE 0 END), 0) AS net_spend_minor FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.status = 'posted' AND t.event_kind IN ('purchase','refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_spend_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY 1 ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status IN ('active','ACTIVE','Active') WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH r AS (SELECT related_transaction_id AS pid, SUM(amount_minor) AS refunded FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, r.refunded AS refunded_july_minor FROM r JOIN transactions p ON p.transaction_id = r.pid WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_in_july_minor FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.currency = 'CAD' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_july_minor FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.currency = 'CAD' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00' AND COALESCE(r.status, '') NOT IN ('declined', 'failed', 'reversed', 'cancelled', 'canceled', 'voided')",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS refunded_purchase_count FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT r.related_transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS deposit_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'deposit' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind = 'withdrawal' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind='withdrawal' AND status='posted' AND currency='CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS withdrawal_minor FROM transactions t JOIN accounts a ON t.account_id=a.account_id WHERE t.event_kind='withdrawal' AND t.status='posted' AND a.currency='CAD' AND t.posted_at>=TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at<TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction IN ('credit','CREDIT','Credit','in','inflow','IN','INFLOW') THEN amount_minor WHEN direction IN ('debit','DEBIT','Debit','out','outflow','OUT','OUTFLOW') THEN -amount_minor ELSE 0 END),0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND transfer_group_id IS NULL AND posted_at IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'USD' AND t.status = 'posted' AND t.event_kind <> 'transfer' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction IN ('credit','CREDIT','Credit','in','inbound') THEN amount_minor WHEN direction IN ('debit','DEBIT','Debit','out','outbound') THEN -amount_minor ELSE 0 END),0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status IN ('posted','POSTED','Posted') AND transfer_group_id IS NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE status = 'posted' AND currency = 'USD' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH legs AS (SELECT t.transfer_group_id, t.direction, t.amount_minor, t.occurred_at FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.transfer_group_id IS NOT NULL AND t.currency = 'CAD' AND t.status = 'posted'), grp AS (SELECT transfer_group_id, MAX(CASE WHEN direction = 'debit' THEN amount_minor END) AS amt, MIN(occurred_at) AS occ, SUM(CASE WHEN direction = 'debit' THEN 1 ELSE 0 END) AS d, SUM(CASE WHEN direction = 'credit' THEN 1 ELSE 0 END) AS c FROM legs GROUP BY transfer_group_id) SELECT COALESCE(SUM(amt), 0) AS internal_transfer_volume_minor FROM grp WHERE d > 0 AND c > 0 AND occ >= TIMESTAMP '2026-07-01 00:00:00' AND occ < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH t AS (SELECT COALESCE(transfer_group_id, transaction_id) AS g, MAX(amount_minor) AS amt FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(transfer_group_id, transaction_id)) SELECT COALESCE(SUM(amt), 0) AS internal_transfer_volume_minor FROM t",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT COALESCE(transfer_group_id, transaction_id)) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT t.currency, COUNT(DISTINCT t.transfer_group_id) AS transfer_count FROM transactions t WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY t.currency ORDER BY t.currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE transfer_group_id IS NOT NULL AND status IN ('posted','completed','settled','POSTED','COMPLETED','SETTLED') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH last_dates AS (SELECT d.account_id, MAX(d.balance_date) AS bd FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date <= DATE '2026-07-31' GROUP BY d.account_id) SELECT COALESCE(SUM(d.closing_minor), 0) AS closing_balance_minor FROM account_daily d JOIN last_dates l ON l.account_id = d.account_id AND l.bd = d.balance_date",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH last_dates AS (SELECT account_id, MAX(balance_date) AS bd FROM account_daily WHERE currency = 'CAD' AND balance_date <= DATE '2026-07-31' GROUP BY account_id) SELECT COALESCE(SUM(d.closing_minor), 0) AS total_closing_minor FROM account_daily d JOIN last_dates l ON d.account_id = l.account_id AND d.balance_date = l.bd WHERE d.currency = 'CAD'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'USD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS combined_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.opening_minor),0) AS opening_ledger_balance_minor FROM account_daily ad JOIN accounts a ON a.account_id = ad.account_id WHERE a.currency = 'CAD' AND ad.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS total_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date=DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(t.amount_minor),0) AS total_amount_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE a.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'pending' AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND (c.purchase_count > 0 OR c.purchased_minor > 0)) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily s WHERE s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' AND (s.purchase_count > 0 OR s.purchased_minor > 0)) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH o AS (SELECT account_id, SUM(opening_minor) AS opening_minor FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY account_id), m AS (SELECT account_id, SUM(posted_credit_minor - posted_debit_minor) AS movement_minor FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date < DATE '2026-08-01' GROUP BY account_id), c AS (SELECT account_id, SUM(closing_minor) AS closing_minor FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY account_id) SELECT a.currency, SUM(COALESCE(o.opening_minor, a.opening_balance_minor)) AS opening_balance_minor, SUM(COALESCE(m.movement_minor, 0)) AS signed_movement_minor, SUM(COALESCE(c.closing_minor, COALESCE(o.opening_minor, a.opening_balance_minor) + COALESCE(m.movement_minor, 0))) AS closing_balance_minor FROM accounts a LEFT JOIN o ON o.account_id = a.account_id LEFT JOIN m ON m.account_id = a.account_id LEFT JOIN c ON c.account_id = a.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "invalid_response",
      "sql": null,
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": false,
      "status": "invalid_response",
      "sql": null,
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 1,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) AS refunded_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) FROM transactions WHERE event_kind = 'purchase' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_spend_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count + s.refund_count) > 0 OR SUM(ABS(s.purchased_minor) + ABS(s.refunded_minor)) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 OR SUM(s.purchased_minor) <> 0 OR SUM(s.refunded_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON c.account_id = a.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_spend_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_spend_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(s.net, 0) AS net_minor FROM accounts a LEFT JOIN (SELECT account_id, SUM(net_spend_minor) AS net FROM card_spend_daily WHERE spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND currency = 'CAD' GROUP BY account_id) s ON s.account_id = a.account_id WHERE a.currency = 'CAD' ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(s.net, 0) AS net_minor FROM accounts a LEFT JOIN (SELECT account_id, SUM(net_spend_minor) AS net FROM card_spend_daily WHERE spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND currency = 'USD' GROUP BY account_id) s ON s.account_id = a.account_id WHERE a.currency = 'USD' ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count) + SUM(refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count + refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH s AS (SELECT account_id, SUM(CASE WHEN event_kind='purchase' THEN amount_minor WHEN event_kind='refund' THEN -amount_minor ELSE 0 END) AS net FROM transactions WHERE status='posted' AND event_kind IN ('purchase','refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY account_id) SELECT a.account_id, CAST(COALESCE(s.net,0) AS BIGINT) AS net_minor FROM accounts a LEFT JOIN s ON s.account_id=a.account_id WHERE a.currency='CAD' ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY 1 ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status IN ('active','ACTIVE','Active') WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_cards FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status IN ('active','ACTIVE','Active') GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH r AS (SELECT related_transaction_id AS pid, SUM(amount_minor) AS refunded FROM transactions WHERE event_kind='refund' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) SELECT p.transaction_id, p.amount_minor, r.refunded FROM r JOIN transactions p ON p.transaction_id = r.pid WHERE p.currency='CAD' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_july_minor FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND p.event_kind = 'purchase' AND r.status = 'posted' AND r.currency = 'CAD' AND p.currency = 'CAD' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_july_minor FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "query_denied",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE LOWER(r.event_kind) = 'refund' AND LOWER(p.event_kind) = 'purchase' AND p.currency = 'CAD' AND r.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00' AND LOWER(COALESCE(r.status, '')) NOT IN ('declined', 'failed', 'reversed', 'cancelled', 'canceled', 'voided')",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND p.event_kind = 'purchase' AND p.status <> 'void' AND p.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT r.related_transaction_id) AS refunded_purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS deposit_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.event_kind = 'deposit' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind = 'deposit' AND status = 'posted' AND currency = 'USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "query_denied",
      "sql": "SELECT COALESCE(SUM(amount_minor), 0) AS withdrawal_minor FROM transactions WHERE LOWER(event_kind) = 'withdrawal' AND LOWER(status) = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind='withdrawal' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS withdrawal_minor FROM transactions t JOIN accounts a ON t.account_id=a.account_id WHERE t.event_kind='withdrawal' AND t.status='posted' AND a.currency='CAD' AND t.posted_at>=TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at<TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.status = 'posted' AND t.event_kind <> 'transfer' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor WHEN t.direction = 'debit' THEN -t.amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions t WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.transfer_group_id IS NULL AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND a.currency = 'USD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status = 'posted' AND transfer_group_id IS NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE status = 'posted' AND currency = 'USD' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH t AS (SELECT transfer_group_id, MAX(amount_minor) AS amt FROM transactions WHERE transfer_group_id IS NOT NULL AND currency = 'CAD' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) SELECT COALESCE(SUM(amt), 0) AS internal_transfer_volume_minor FROM t",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH g AS (SELECT transfer_group_id, MAX(amount_minor) AS amt FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND currency = 'CAD' AND transfer_group_id IS NOT NULL AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) SELECT COALESCE(SUM(amt), 0) AS internal_transfer_volume_minor FROM g",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT COALESCE(transfer_group_id, transaction_id)) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE transfer_group_id IS NOT NULL AND posted_at IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' AND status IN ('posted','completed','settled','booked','POSTED','COMPLETED','SETTLED','BOOKED') GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS closing_balance_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(ad.closing_minor), 0) AS combined_closing_minor FROM account_daily ad WHERE ad.currency = 'USD' AND ad.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'USD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor),0) AS opening_ledger_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.opening_minor),0) AS opening_ledger_balance_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor),0) FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date=DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE event_kind='purchase' AND status='pending' AND currency='CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "query_denied",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND LOWER(event_kind) = 'purchase' AND LOWER(status) = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE event_kind = 'purchase' AND status = 'void' AND currency = 'CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.purchase_count > 0) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND a.account_id NOT IN (SELECT c.account_id FROM card_spend_daily c WHERE c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND c.currency = 'CAD' AND (c.purchase_count > 0 OR c.purchased_minor > 0) AND c.account_id IS NOT NULL) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH o AS (SELECT a.currency, SUM(d.opening_minor) AS opening_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE d.balance_date = DATE '2026-07-01' GROUP BY a.currency), m AS (SELECT a.currency, SUM(d.posted_credit_minor - d.posted_debit_minor) AS movement_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE d.balance_date >= DATE '2026-07-01' AND d.balance_date < DATE '2026-08-01' GROUP BY a.currency), c AS (SELECT a.currency, SUM(d.closing_minor) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE d.balance_date = DATE '2026-07-31' GROUP BY a.currency) SELECT o.currency, o.opening_minor, COALESCE(m.movement_minor, 0) AS movement_minor, c.closing_minor FROM o LEFT JOIN m ON m.currency = o.currency LEFT JOIN c ON c.currency = o.currency ORDER BY o.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH a AS (SELECT account_id, currency FROM accounts), o AS (SELECT account_id, SUM(opening_minor) AS opening FROM account_daily WHERE balance_date = DATE '2026-07-01' GROUP BY account_id), m AS (SELECT account_id, SUM(posted_credit_minor - posted_debit_minor) AS movement FROM account_daily WHERE balance_date >= DATE '2026-07-01' AND balance_date <= DATE '2026-07-31' GROUP BY account_id), c AS (SELECT account_id, SUM(closing_minor) AS closing FROM account_daily WHERE balance_date = DATE '2026-07-31' GROUP BY account_id) SELECT a.currency, COALESCE(SUM(o.opening),0) AS opening_balance_minor, COALESCE(SUM(m.movement),0) AS posted_movement_minor, COALESCE(SUM(c.closing),0) AS closing_balance_minor FROM a LEFT JOIN o ON o.account_id = a.account_id LEFT JOIN m ON m.account_id = a.account_id LEFT JOIN c ON c.account_id = a.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH mv AS (SELECT a.account_id, a.currency, a.opening_balance_minor AS ob, COALESCE(SUM(CASE WHEN t.posted_at < TIMESTAMP '2026-07-01 00:00:00' THEN CASE WHEN t.direction='credit' THEN t.amount_minor ELSE -t.amount_minor END ELSE 0 END),0) AS pre, COALESCE(SUM(CASE WHEN t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' THEN CASE WHEN t.direction='credit' THEN t.amount_minor ELSE -t.amount_minor END ELSE 0 END),0) AS jul FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.status = 'posted' AND t.posted_at IS NOT NULL GROUP BY a.account_id, a.currency, a.opening_balance_minor) SELECT currency, SUM(ob + pre) AS opening_balance_minor, SUM(jul) AS posted_movement_minor, SUM(ob + pre + jul) AS closing_balance_minor FROM mv GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 2,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B01",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1342646
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_card_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B02",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          580559
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor), 0) AS refunded_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B03",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(refunded_minor),0) FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          64654
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B04",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          1277992
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_card_spend_minor FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B05",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(net_spend_minor),0) AS net_spend_minor FROM card_spend_daily WHERE currency='USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          554332
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B06",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchase_count),0) AS purchase_events FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
      "rows": [
        [
          286
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 OR SUM(s.purchased_minor) <> 0 OR SUM(s.refunded_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_spend_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count + s.refund_count) > 0 OR SUM(ABS(s.purchased_minor) + ABS(s.refunded_minor)) > 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B07",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Software",
          224575
        ],
        [
          "Supplies",
          219068
        ],
        [
          "Travel",
          249615
        ],
        [
          "Uncategorized",
          291177
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_spend_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 OR SUM(s.purchased_minor) <> 0 OR SUM(s.refunded_minor) <> 0 ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY category_label",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B08",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY 1 HAVING SUM(s.purchase_count) + SUM(s.refund_count) > 0 OR SUM(s.purchased_minor) <> 0 OR SUM(s.refunded_minor) <> 0 ORDER BY 1",
      "rows": [
        [
          "Meals",
          111588
        ],
        [
          "Software",
          101312
        ],
        [
          "Supplies",
          94490
        ],
        [
          "Travel",
          117967
        ],
        [
          "Uncategorized",
          128975
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B09",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          230735
        ],
        [
          "org_02",
          203006
        ],
        [
          "org_03",
          253869
        ],
        [
          "org_04",
          250691
        ],
        [
          "org_05",
          243071
        ],
        [
          "org_06",
          96620
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B10",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.organization_id, SUM(c.net_spend_minor) AS net_spend_minor FROM card_spend_daily c JOIN accounts a ON a.account_id = c.account_id WHERE c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' GROUP BY a.organization_id ORDER BY a.organization_id",
      "rows": [
        [
          "org_01",
          106600
        ],
        [
          "org_02",
          127490
        ],
        [
          "org_03",
          88313
        ],
        [
          "org_04",
          103972
        ],
        [
          "org_05",
          127957
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(t.net), 0) AS net_minor FROM accounts a LEFT JOIN (SELECT account_id, SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor WHEN event_kind = 'refund' THEN -amount_minor ELSE 0 END) AS net FROM transactions WHERE status = 'posted' AND event_kind IN ('purchase','refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY account_id) t ON t.account_id = a.account_id WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B11",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          129813
        ],
        [
          "acct_002",
          100922
        ],
        [
          "acct_004",
          106104
        ],
        [
          "acct_005",
          96902
        ],
        [
          "acct_007",
          130636
        ],
        [
          "acct_008",
          123233
        ],
        [
          "acct_010",
          124114
        ],
        [
          "acct_011",
          126577
        ],
        [
          "acct_013",
          120981
        ],
        [
          "acct_014",
          122090
        ],
        [
          "acct_016",
          96620
        ],
        [
          "acct_017",
          0
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(s.net, 0) AS net_minor FROM accounts a LEFT JOIN (SELECT account_id, SUM(net_spend_minor) AS net FROM card_spend_daily WHERE spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' AND currency = 'USD' GROUP BY account_id) s ON s.account_id = a.account_id WHERE a.currency = 'USD' ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_spend_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B12",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(c.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily c ON c.account_id = a.account_id AND c.currency = 'USD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_003",
          106600
        ],
        [
          "acct_006",
          127490
        ],
        [
          "acct_009",
          88313
        ],
        [
          "acct_012",
          103972
        ],
        [
          "acct_015",
          127957
        ],
        [
          "acct_018",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count) + SUM(refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date HAVING SUM(purchase_count + refund_count) > 0 ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B13",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS spend_day, SUM(net_spend_minor) AS net_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date",
      "rows": [
        [
          "2026-07-01",
          66420
        ],
        [
          "2026-07-02",
          48706
        ],
        [
          "2026-07-03",
          29351
        ],
        [
          "2026-07-04",
          43817
        ],
        [
          "2026-07-05",
          25257
        ],
        [
          "2026-07-06",
          47767
        ],
        [
          "2026-07-07",
          54913
        ],
        [
          "2026-07-08",
          37942
        ],
        [
          "2026-07-09",
          37747
        ],
        [
          "2026-07-10",
          42269
        ],
        [
          "2026-07-11",
          58518
        ],
        [
          "2026-07-12",
          27667
        ],
        [
          "2026-07-13",
          52979
        ],
        [
          "2026-07-14",
          49789
        ],
        [
          "2026-07-15",
          25343
        ],
        [
          "2026-07-16",
          29279
        ],
        [
          "2026-07-17",
          41628
        ],
        [
          "2026-07-18",
          46129
        ],
        [
          "2026-07-19",
          34962
        ],
        [
          "2026-07-20",
          43742
        ],
        [
          "2026-07-21",
          40948
        ],
        [
          "2026-07-22",
          45552
        ],
        [
          "2026-07-23",
          26826
        ],
        [
          "2026-07-24",
          49751
        ],
        [
          "2026-07-25",
          30147
        ],
        [
          "2026-07-26",
          34592
        ],
        [
          "2026-07-27",
          61314
        ],
        [
          "2026-07-28",
          38322
        ],
        [
          "2026-07-29",
          37432
        ],
        [
          "2026-07-30",
          30821
        ],
        [
          "2026-07-31",
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH s AS (SELECT account_id, SUM(CASE WHEN event_kind='purchase' THEN amount_minor ELSE -amount_minor END) AS net FROM transactions WHERE status='posted' AND event_kind IN ('purchase','refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY account_id) SELECT a.account_id, COALESCE(s.net,0) AS net_minor FROM accounts a LEFT JOIN s ON s.account_id=a.account_id WHERE a.currency='CAD' ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B14",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
      "rows": [
        [
          "acct_007",
          130636
        ],
        [
          "acct_001",
          129813
        ],
        [
          "acct_011",
          126577
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY 1 ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B15",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS category_label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON s.category_id = c.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, category_label ASC LIMIT 3",
      "rows": [
        [
          "Meals",
          293557
        ],
        [
          "Uncategorized",
          291177
        ],
        [
          "Travel",
          249615
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status IN ('active','ACTIVE','Active') WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B16",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY a.account_id",
      "rows": [
        [
          "acct_001",
          2
        ],
        [
          "acct_002",
          2
        ],
        [
          "acct_004",
          2
        ],
        [
          "acct_005",
          1
        ],
        [
          "acct_007",
          2
        ],
        [
          "acct_008",
          2
        ],
        [
          "acct_010",
          1
        ],
        [
          "acct_011",
          2
        ],
        [
          "acct_013",
          2
        ],
        [
          "acct_014",
          2
        ],
        [
          "acct_016",
          2
        ],
        [
          "acct_017",
          2
        ],
        [
          "acct_019",
          0
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B17",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, COUNT(c.card_id) AS active_card_count FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status IN ('active','ACTIVE','Active') GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          22
        ],
        [
          "USD",
          5
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH r AS (SELECT related_transaction_id AS pid, SUM(amount_minor) AS refunded FROM transactions WHERE event_kind = 'refund' AND status = 'posted' AND currency = 'CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY related_transaction_id) SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, r.refunded AS refunded_july_minor FROM r JOIN transactions p ON p.transaction_id = r.pid WHERE p.currency = 'CAD' ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_july_minor FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B18",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT p.transaction_id, p.amount_minor AS original_purchase_minor, SUM(r.amount_minor) AS refunded_in_july_minor FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.currency = 'CAD' GROUP BY p.transaction_id, p.amount_minor ORDER BY p.transaction_id",
      "rows": [
        [
          "boundary_june_occurrence",
          12345,
          3345
        ],
        [
          "txn_00007",
          1520,
          506
        ],
        [
          "txn_00015",
          7754,
          2584
        ],
        [
          "txn_00030",
          8191,
          2730
        ],
        [
          "txn_00041",
          9577,
          3192
        ],
        [
          "txn_00049",
          1443,
          481
        ],
        [
          "txn_00057",
          4566,
          1522
        ],
        [
          "txn_00065",
          546,
          182
        ],
        [
          "txn_00118",
          5858,
          1952
        ],
        [
          "txn_00126",
          3656,
          1218
        ],
        [
          "txn_00134",
          6827,
          2275
        ],
        [
          "txn_00145",
          5990,
          1996
        ],
        [
          "txn_00153",
          3000,
          1000
        ],
        [
          "txn_00212",
          7369,
          2456
        ],
        [
          "txn_00220",
          6360,
          2120
        ],
        [
          "txn_00228",
          9820,
          3273
        ],
        [
          "txn_00236",
          5333,
          1777
        ],
        [
          "txn_00247",
          6544,
          2181
        ],
        [
          "txn_00262",
          5017,
          1672
        ],
        [
          "txn_00270",
          6727,
          2242
        ],
        [
          "txn_00316",
          960,
          320
        ],
        [
          "txn_00324",
          7040,
          2346
        ],
        [
          "txn_00332",
          3863,
          1287
        ],
        [
          "txn_00340",
          3740,
          1246
        ],
        [
          "txn_00351",
          5838,
          1946
        ],
        [
          "txn_00359",
          1907,
          635
        ],
        [
          "txn_00367",
          2869,
          956
        ],
        [
          "txn_00418",
          5596,
          1865
        ],
        [
          "txn_00426",
          5476,
          1825
        ],
        [
          "txn_00434",
          5894,
          1964
        ],
        [
          "txn_00442",
          4394,
          1464
        ],
        [
          "txn_00453",
          8460,
          2820
        ],
        [
          "txn_00461",
          7231,
          2410
        ],
        [
          "txn_00469",
          1055,
          351
        ],
        [
          "txn_00477",
          2564,
          854
        ],
        [
          "txn_00522",
          3059,
          1019
        ],
        [
          "txn_00530",
          3720,
          1240
        ],
        [
          "txn_00538",
          4208,
          1402
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT p.transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B19",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(DISTINCT r.related_transaction_id) AS purchase_count FROM transactions r JOIN transactions p ON r.related_transaction_id = p.transaction_id WHERE r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          38
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='CAD' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS deposit_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'deposit' AND t.status = 'posted' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          769596
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B20",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS deposit_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'USD' AND t.event_kind = 'deposit' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B21",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS deposit_minor FROM transactions WHERE event_kind='deposit' AND status='posted' AND currency='USD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          320665
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "wrong_clarification",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(amount_minor),0) AS withdrawal_minor FROM transactions WHERE event_kind='withdrawal' AND status='posted' AND currency='CAD' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B22",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS withdrawal_minor FROM transactions t JOIN accounts a ON t.account_id=a.account_id WHERE t.event_kind='withdrawal' AND t.status='posted' AND a.currency='CAD' AND t.posted_at>=TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at<TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          12084
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.status = 'posted' AND t.event_kind <> 'transfer' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B23",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction IN ('credit','CREDIT','Credit','in','inflow') THEN amount_minor WHEN direction IN ('debit','DEBIT','Debit','out','outflow') THEN -amount_minor ELSE 0 END),0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'CAD' AND status IN ('posted','POSTED','Posted') AND transfer_group_id IS NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -520480
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_external_cash_flow_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.status = 'posted' AND t.event_kind <> 'transfer' AND a.currency = 'USD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "query_denied",
      "sql": "SELECT COALESCE(SUM(CASE WHEN LOWER(direction) IN ('credit','in','inbound') THEN amount_minor WHEN LOWER(direction) IN ('debit','out','outbound') THEN -amount_minor ELSE 0 END),0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND LOWER(status) = 'posted' AND transfer_group_id IS NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B24",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor WHEN direction = 'debit' THEN -amount_minor ELSE 0 END), 0) AS net_external_cash_flow_minor FROM transactions WHERE currency = 'USD' AND status = 'posted' AND NOT (event_kind = 'transfer' AND transfer_group_id IS NOT NULL) AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          -238702
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH g AS (SELECT transfer_group_id, MAX(amount_minor) AS amt FROM transactions WHERE transfer_group_id IS NOT NULL AND currency = 'CAD' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) SELECT COALESCE(SUM(amt), 0) AS internal_transfer_volume_minor FROM g",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH g AS (SELECT transfer_group_id, MAX(amount_minor) AS amt FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND currency = 'CAD' AND transfer_group_id IS NOT NULL AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) SELECT COALESCE(SUM(amt), 0) AS transfer_volume_minor FROM g",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B25",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(t.amount_minor),0) AS transfer_volume_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.event_kind = 'transfer' AND t.status = 'posted' AND t.direction = 'debit' AND a.currency = 'CAD' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          13910
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT COALESCE(transfer_group_id, transaction_id)) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B26",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) AS transfer_count FROM transactions WHERE transfer_group_id IS NOT NULL AND status IN ('posted','completed','settled','POSTED','COMPLETED','SETTLED') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency ORDER BY currency",
      "rows": [
        [
          "CAD",
          4
        ],
        [
          "USD",
          4
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B27",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-31'",
      "rows": [
        [
          125676
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH last_dates AS (SELECT account_id, MAX(balance_date) AS d FROM account_daily WHERE currency = 'USD' AND balance_date <= DATE '2026-07-31' GROUP BY account_id) SELECT COALESCE(SUM(ad.closing_minor), 0) AS total_closing_minor FROM account_daily ad JOIN last_dates ld ON ad.account_id = ld.account_id AND ad.balance_date = ld.d WHERE ad.currency = 'USD'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B28",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'USD' AND d.balance_date = DATE '2026-07-31'",
      "rows": [
        [
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor), 0) AS combined_opening_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.opening_minor),0) AS opening_ledger_balance_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B29",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(opening_minor),0) FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-01'",
      "rows": [
        [
          646156
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(d.closing_minor),0) AS closing_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE a.currency = 'CAD' AND d.balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_closing_minor FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B30",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-15'",
      "rows": [
        [
          308471
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date=DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B31",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date=DATE '2026-07-01'",
      "rows": [
        [
          66420
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor),0) AS gross_spend_minor FROM card_spend_daily WHERE currency='CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B32",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COALESCE(SUM(purchased_minor), 0) AS gross_spend_minor FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
      "rows": [
        [
          38062
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(t.amount_minor),0) AS total_amount_minor FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE a.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'pending' AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor), 0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B33",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          31,
          146326
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "query_denied",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency = 'CAD' AND LOWER(event_kind) = 'purchase' AND LOWER(status) IN ('void','voided') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(amount_minor),0) AS total_amount_minor FROM transactions WHERE currency='CAD' AND event_kind='purchase' AND status='void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B34",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT COUNT(*) AS event_count, COALESCE(SUM(t.amount_minor),0) AS total_amount_minor FROM transactions t WHERE t.event_kind = 'purchase' AND t.status = 'void' AND t.currency = 'CAD' AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
      "rows": [
        [
          25,
          145470
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND (c.purchase_count > 0 OR c.purchased_minor > 0)) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00') ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B35",
      "arm": "bare",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily c WHERE c.account_id = a.account_id AND c.currency = 'CAD' AND c.spend_date >= DATE '2026-07-01' AND c.spend_date < DATE '2026-08-01' AND (c.purchase_count > 0 OR c.purchased_minor > 0)) ORDER BY a.account_id",
      "rows": [
        [
          "acct_017"
        ],
        [
          "acct_019"
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "documented",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "SELECT a.currency, SUM(CASE WHEN d.balance_date = DATE '2026-07-01' THEN d.opening_minor ELSE 0 END) AS opening_balance_minor, SUM(d.posted_credit_minor - d.posted_debit_minor) AS net_movement_minor, SUM(CASE WHEN d.balance_date = DATE '2026-07-31' THEN d.closing_minor ELSE 0 END) AS closing_balance_minor FROM account_daily d JOIN accounts a ON a.account_id = d.account_id WHERE d.balance_date >= DATE '2026-07-01' AND d.balance_date < DATE '2026-08-01' GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "bare",
      "kind": "analytical",
      "correct": false,
      "status": "invalid_response",
      "sql": null,
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B36",
      "arm": "values",
      "kind": "analytical",
      "correct": true,
      "status": "correct",
      "sql": "WITH tx AS (SELECT account_id, SUM(CASE WHEN posted_at < TIMESTAMP '2026-07-01 00:00:00' THEN CASE WHEN direction='credit' THEN amount_minor ELSE -amount_minor END ELSE 0 END) AS pre_mv, SUM(CASE WHEN posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' THEN CASE WHEN direction='credit' THEN amount_minor ELSE -amount_minor END ELSE 0 END) AS jul_mv FROM transactions WHERE status='posted' AND posted_at IS NOT NULL GROUP BY account_id) SELECT a.currency, SUM(a.opening_balance_minor + COALESCE(t.pre_mv,0)) AS opening_balance_minor, SUM(COALESCE(t.jul_mv,0)) AS july_movement_minor, SUM(a.opening_balance_minor + COALESCE(t.pre_mv,0) + COALESCE(t.jul_mv,0)) AS closing_balance_minor FROM accounts a LEFT JOIN tx t ON a.account_id=t.account_id GROUP BY a.currency ORDER BY a.currency",
      "rows": [
        [
          "CAD",
          646156,
          -520480,
          125676
        ],
        [
          "USD",
          258815,
          -238702,
          20113
        ]
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B37",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "currency"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B38",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "time_window"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "balance_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B39",
      "arm": "values",
      "kind": "clarification",
      "correct": false,
      "status": "unsupported_answer",
      "sql": "SELECT COALESCE(SUM(closing_minor),0) AS total_balance_minor FROM account_daily WHERE currency='CAD' AND balance_date=DATE '2026-07-31'",
      "rows": null
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "bare",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "values",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    },
    {
      "model": "claude-opus-5-5",
      "repeat": 3,
      "question_id": "B40",
      "arm": "documented",
      "kind": "clarification",
      "correct": true,
      "status": "correct",
      "sql": null,
      "rows": null,
      "missing": [
        "metric_definition"
      ]
    }
  ]
}
