{
  "fixture": "vetslearn-intermediate-03",
  "revision": "2026-10-09",
  "people": {
    "fileRows": 10,
    "distinctPeople": 9,
    "duplicatedPersonIds": [
      "P04"
    ]
  },
  "applications": {
    "rows": 12,
    "noMatchingPerson": [
      {
        "app_id": "A07",
        "person_id": "P99"
      }
    ],
    "invalidDates": [
      {
        "app_id": "A08",
        "submitted_on": "2026-02-30"
      }
    ]
  },
  "join": {
    "leftJoinRowsAsGiven": 13,
    "innerJoinRowsAsGiven": 12,
    "peopleWithAnApplication": 8,
    "peopleWithNoApplication": [
      "P07"
    ]
  },
  "applicationsPerPerson": {
    "P01": 2,
    "P02": 1,
    "P03": 1,
    "P04": 1,
    "P05": 3,
    "P06": 1,
    "P07": 0,
    "P08": 1,
    "P09": 1
  },
  "problems": [
    {
      "kind": "duplicate person_id",
      "file": "people.csv",
      "id": "P04",
      "why": "person_id P04 is on 2 rows of people.csv, so a join returns that person's applications 2 times",
      "handling": "count one row per person_id; keep the file as received and report the repeat"
    },
    {
      "kind": "no matching person",
      "file": "applications.csv",
      "id": "A07",
      "why": "A07 names person_id P99, which is not in people.csv, so a join from people drops it",
      "handling": "set aside and report as an application with an unknown owner; do not invent a person"
    },
    {
      "kind": "invalid date",
      "file": "applications.csv",
      "id": "A08",
      "why": "A08 has submitted_on 2026-02-30, which is not a calendar date",
      "handling": "keep the row, flag it, leave it out of date-based counts; do not guess the day"
    }
  ],
  "report": {
    "people": 9,
    "applications": 12,
    "applicationsWithAKnownOwner": 11
  },
  "lineage": {
    "files": [
      "people.csv",
      "applications.csv"
    ],
    "filter": "one row per person_id; no application rows removed",
    "join": "people LEFT JOIN applications ON applications.person_id = people.person_id",
    "query": "solve.sql and solve.py, revision 2026-10-09"
  }
}
