Q37, run 2026-11-04-1738-sonnet
How many distinct legal entities does the data describe?
Tests: Identity: records with the same LEI are one entity.
Expected: count = 331
csv run 1
344. There are 370 rows, and 26 are RESEARCH duplicates of the same LEI.
JSON: {"count": 344}
Why: count: expected 331, got 344
csv run 2
344. There are 370 rows, and 26 are RESEARCH duplicates sharing a LEI with another row.
JSON: {"count": 344}
Why: count: expected 331, got 344
csv run 3
344. There are 370 rows, less 26 duplicate rows that share an LEI with another row.
JSON: {"count": 344}
Why: count: expected 331, got 344
csv run 4
344. There are 370 rows, and 26 RESEARCH rows duplicate an LEI already present.
JSON: {"count": 344}
Why: count: expected 331, got 344
csv run 5
344. That is 370 records minus 26 duplicates sharing a LEI, and it includes the two sovereigns.
JSON: {"count": 344}
Why: count: expected 331, got 344
csv+markdown run 1
331. There are 370 records. Removing 13 QA records and 26 same-LEI duplicates leaves 331; the two sovereigns have no LEI and are counted.
JSON: {"count": 331}
csv+markdown run 2
330 distinct legal entities. This excludes QA records, collapses duplicate LEIs, and includes the two sovereigns.
JSON: {"count": 330}
Why: count: expected 331, got 330
csv+markdown run 3
331. That is 370 records, less 13 QA records and 26 duplicate research records.
JSON: {"count": 331}
csv+markdown run 4
331. The file has 370 records. I removed 13 QA records (E16 and E1340–E1351) and 26 same-LEI RESEARCH duplicates.
JSON: {"count": 331}
csv+markdown run 5
331. The 370 records minus 13 QA records (E16, E1340–E1351) and 26 duplicate-LEI records leaves 331, with the sovereigns VD and CV counted as entities.
JSON: {"count": 331}
executed run 1
331 rows in entities.csv. Duplicate records were already merged into single entities, so each row is one distinct legal entity.
JSON: {"count": 331}
executed run 2
331, the number of rows in entities.csv after duplicates were merged.
JSON: {"count": 331}
executed run 3
331 entity rows, after duplicate records were merged.
JSON: {"count": 331}
executed run 4
331 rows in entities.csv.
JSON: {"count": 331}
executed run 5
331. This is the number of rows in entities.csv, with duplicates already merged.
JSON: {"count": 331}