Q37, run 2026-11-06-0935-sonnet-query
How many distinct legal entities does the data describe?
Tests: Identity: records with the same LEI are one entity.
Expected: count = 16
sql run 1
17. The 19 rows include two duplicates by LEI: E03 duplicates E02, and E17 duplicates E10.
JSON: {"count": 17}
Why: count: expected 16, got 17
sql run 2
17. E03 duplicates E02 and E17 duplicates E10, both by LEI.
JSON: {"count": 17}
Why: count: expected 16, got 17
sql run 3
17. E03 duplicates E02 and E17 duplicates E10, both by LEI.
JSON: {"count": 17}
Why: count: expected 16, got 17
sql run 4
17. Of the 19 rows, E03 duplicates E02 and E17 duplicates E10, going by the shared LEIs.
JSON: {"count": 17}
Why: count: expected 16, got 17
sql run 5
17. The 19 rows contain two duplicates, E03 (of E02) and E17 (of E10), identified by shared LEIs.
JSON: {"count": 17}
Why: count: expected 16, got 17
sql+markdown run 1
16. That is 19 records, less the duplicates E03 and E17 and the QA record E16.
JSON: {"count": 16}
sql+markdown run 2
16. There are 19 records. E16 is QA, E03 duplicates E02, and E17 duplicates E10.
JSON: {"count": 16}
sql+markdown run 3
16. There are 19 records. E03 and E17 duplicate E02 and E10 by LEI, and E16 is QA.
JSON: {"count": 16}
sql+markdown run 4
16. That is 19 records, less the duplicates E03 and E17 and the QA record E16.
JSON: {"count": 16}
sql+markdown run 5
16. There are 19 records. Excluding the QA record E16, merging E03 into E02 and E17 into E10 leaves 16, which includes the two sovereigns.
JSON: {"count": 16}
sparql run 1
17. There are 19 records, and E03 and E17 are duplicates by LEI of E02 and E10.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql run 2
17. There are 19 entity records, and E03 duplicates E02 and E17 duplicates E10 (same LEIs).
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql run 3
17. There are 19 records, minus the duplicates E03 (same LEI as E02) and E17 (the name matches E10, but E17 has no LEI, so this is inferred).
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql run 4
17. There are 19 entity records, but E03 duplicates E02 and E17 duplicates E10, as shown by their shared LEIs.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql run 5
17. There are 19 records, and E03 and E17 are duplicates sharing the LEIs of E02 and E10.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql+ontology run 1
16. There are 19 records. Removing the QA record E16 leaves 18, and merging E03 into E02 and E17 into E10 gives 16.
JSON: {"count": 16}
sparql+ontology run 2
16. There are 19 records, minus the QA record E16 and the duplicates E03 and E17.
JSON: {"count": 16}
sparql+ontology run 3
16. There are 19 records. E03 and E17 duplicate other records by LEI, and E16 is QA.
JSON: {"count": 16}
sparql+ontology run 4
16. There are 19 records. E03 and E17 duplicate E02 and E10, and E16 is QA.
JSON: {"count": 16}
sparql+ontology run 5
16. There are 19 records. E03 duplicates E02 and E17 duplicates E10, and E16 is QA and describes no real entity.
JSON: {"count": 16}
sql+executed run 1
16. The entities table is already deduplicated and includes the two sovereigns.
JSON: {"count": 16}
sql+executed run 2
16, the number of rows in `entities`, which already has duplicates merged.
JSON: {"count": 16}
sql+executed run 3
16 entity rows, after duplicate records were merged (E03 into E02, E17 into E10).
JSON: {"count": 16}
sql+executed run 4
16. The entities table has 16 rows after duplicates were merged.
JSON: {"count": 16}
sql+executed run 5
16. The entities table has 16 rows after duplicates were merged.
JSON: {"count": 16}
sparql+axioms run 1
17. There are 19 records, with E03 duplicating E02 and E17 duplicating E10.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql+axioms run 2
17. There are 19 records, and E02/E03 and E10/E17 are each one entity.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql+axioms run 3
18. There are 20 records, and E02/E03 and E10/E17 are each one entity.
JSON: {"count": 18}
Why: count: expected 16, got 18
sparql+axioms run 4
17. There are 19 records, and E02/E03 and E10/E17 are each one entity.
JSON: {"count": 17}
Why: count: expected 16, got 17
sparql+axioms run 5
17. There are 19 records, and E03=E02 and E17=E10 are duplicates.
JSON: {"count": 17}
Why: count: expected 16, got 17