Christopher added a comment. The only way to get a count of statements with references in the current model/format is like this:
PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX prov: <http://www.w3.org/ns/prov#> SELECT (count(distinct(?s)) AS ?scount) WHERE { ?s prov:wasDerivedFrom ?wdref . } This query is super slow! In fact, it has crashed Blazegraph because on an unlimited query timeout, it uses all of the 8GB allocated heap space. Since a single statement can have multiple references, just counting prov:wasDerivedFrom using estimated cardinality only returns a count of all references. I asked the experts in the mailing list how we can address this reference query problem, and no one has responded with anything useful yet. This is an issue that could be handled in the Wikibase RDF serialization with any number of different solutions. In addition to the idea of introducing a null reference object, another possibility would be to create a new attribute like wikibase:hasReference with a boolean datatype constraint. I will create a new ticket for this issue I guess. TASK DETAIL https://phabricator.wikimedia.org/T117234 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Christopher Cc: Lydia_Pintscher, StudiesWorld, Addshore, Christopher, Aklapper, Wikidata-bugs, aude, Mbch331 _______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs