Q37, run 2026-11-04-2024-sonnet-query
How many distinct legal entities does the data describe?
Tests: Identity: records with the same LEI are one entity.
Expected: count = 497
sql run 1
511. The 540 rows collapse to 509 distinct LEIs plus 2 sovereigns with no LEI.
JSON: {"count": 511}
Why: count: expected 497, got 511
sql run 2
509. The 540 entity rows contain duplicate LEIs.
JSON: {"count": 509}
Why: count: expected 497, got 509
sql run 3
511 distinct legal entities after merging records that share an LEI.
JSON: {"count": 511}
Why: count: expected 497, got 511
sql+markdown run 1
523. This counts distinct LEIs (sovereigns by ID), excluding QA records.
JSON: {"count": 523}
Why: count: expected 497, got 523
sql+markdown run 2
497 distinct legal entities, after merging records that share an LEI and excluding QA records.
JSON: {"count": 497}
sql+markdown run 3
497 distinct entities, counting records by LEI and excluding QA.
JSON: {"count": 497}
sparql run 1
About 511. This is a rough estimate of roughly 540 entity records minus 29 duplicate pairs sharing an LEI.
JSON: {"count": 511}
Why: count: expected 497, got 511
sparql run 2
511. There are 540 records, and 29 LEIs are shared by two records.
JSON: {"count": 511}
Why: count: expected 497, got 511
sparql run 3
About 509, from the distinct LEIs among 540 entity records. Some duplicates, such as E03, E1002 and E1022, share an LEI; entities without an LEI may add to the count.
JSON: {"count": 509}
Why: count: expected 497, got 509
sparql+ontology run 1
497, counting distinct LEIs (or IDs where there is no LEI) and excluding QA records.
JSON: {"count": 497}
sparql+ontology run 2
497. This counts distinct LEIs among non-QA records, with sovereigns counted individually.
JSON: {"count": 497}
sparql+ontology run 3
497. That is 495 distinct LEIs among non-QA records plus the two sovereigns, who have no LEI.
JSON: {"count": 497}
sql+executed run 1
497 distinct entities, since merged duplicates are already collapsed.
JSON: {"count": 497}
sql+executed run 2
497, since the entities table is already deduplicated.
JSON: {"count": 497}
sql+executed run 3
497. The entities table is already deduplicated, with duplicate records merged.
JSON: {"count": 497}
sparql+axioms run 1
511 distinct entities, from 540 records after merging sameEntityAs duplicates.
JSON: {"count": 511}
Why: count: expected 497, got 511
sparql+axioms run 2
511, after collapsing sameEntityAs duplicates.
JSON: {"count": 511}
Why: count: expected 497, got 511
sparql+axioms run 3
511, after merging same-entity duplicates.
JSON: {"count": 511}
Why: count: expected 497, got 511