{
  "sqlite_version": "3.53.1",
  "authored_requests": [
    1,
    2
  ],
  "authored_notes": [
    [
      11,
      1,
      10
    ],
    [
      12,
      1,
      10
    ]
  ],
  "authored_attempts": [
    [
      21,
      1,
      2
    ],
    [
      22,
      1,
      3
    ],
    [
      23,
      1,
      4
    ]
  ],
  "six_actual_joined_rows_for_parent1": [
    [
      1,
      11,
      10,
      21,
      2
    ],
    [
      1,
      11,
      10,
      22,
      3
    ],
    [
      1,
      11,
      10,
      23,
      4
    ],
    [
      1,
      12,
      10,
      21,
      2
    ],
    [
      1,
      12,
      10,
      22,
      3
    ],
    [
      1,
      12,
      10,
      23,
      4
    ]
  ],
  "wrong_columns": [
    "request",
    "count_star",
    "count_notes",
    "count_attempts",
    "sum_note_amount",
    "sum_attempt_seconds"
  ],
  "wrong": [
    [
      1,
      6,
      6,
      6,
      60,
      18
    ],
    [
      2,
      1,
      0,
      0,
      null,
      null
    ]
  ],
  "distinct_columns": [
    "request",
    "distinct_note_ids",
    "distinct_attempt_ids",
    "distinct_amount",
    "distinct_seconds"
  ],
  "distinct_not_general_sum_fix": [
    [
      1,
      2,
      3,
      10,
      9
    ],
    [
      2,
      0,
      0,
      null,
      null
    ]
  ],
  "correct_columns": [
    "request",
    "note_count",
    "attempt_count",
    "note_amount",
    "attempt_seconds"
  ],
  "preaggregate_query": "WITH ns AS(SELECT request_id,COUNT(*) AS n,SUM(amount) AS amount FROM note GROUP BY request_id), ats AS(SELECT request_id,COUNT(*) AS n,SUM(seconds) AS seconds FROM attempt GROUP BY request_id) SELECT r.id,COALESCE(ns.n,0),COALESCE(ats.n,0),ns.amount,ats.seconds FROM request r LEFT JOIN ns ON ns.request_id=r.id LEFT JOIN ats ON ats.request_id=r.id ORDER BY r.id",
  "preaggregated": [
    [
      1,
      2,
      3,
      20,
      9
    ],
    [
      2,
      0,
      0,
      null,
      null
    ]
  ],
  "independent_python_oracle": [
    [
      1,
      2,
      3,
      20,
      9
    ],
    [
      2,
      0,
      0,
      null,
      null
    ]
  ],
  "null_policy": "No-child counts use explicit0; no-child sums kept NULL, not asserted measured0. Both child amounts10 are independent rows and must both contribute.",
  "scope": "No runtime benchmark, CRM data or app architecture claim. Amount integers are authored units, not money or real sales."
}
