Jheald added a comment. I am not sure why we would want to list out all the statements. Surely we just want to count them ?
The query below <http://tinyurl.com/pwqsmww> runs in 8.4 seconds PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX prov: <http://www.w3.org/ns/prov#> prefix p: <http://www.wikidata.org/prop/> SELECT ?nrefs (COUNT(?wds) AS ?count) WHERE { { SELECT ?wds (COUNT(DISTINCT(?ref)) AS ?nrefs) WHERE { ?item p:P227 ?wds . ?wds prov:wasDerivedFrom ?ref . } GROUP BY ?wds } } GROUP BY ?nrefs ORDER BY ?nrefs TASK DETAIL https://phabricator.wikimedia.org/T120166 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Jheald Cc: Smalyshev, Jheald, daniel, Lydia_Pintscher, Aklapper, Christopher, StudiesWorld, jkroll, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, JeroenDeDauw, Mbch331 _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
