query-8e237383286f1ad3ad6d14836443794b

rq turtle/ttl

title:count number of times each heuristics is used in reference SELECT ?heuristic ?heuristicLabel ?count WHERE { { SELECT ?heuristic (COUNT(?item) AS ?count) WHERE { ?item pr:P887 ?heuristic. } GROUP BY ?heuristic } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC (?count)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:count number of times each heuristics is used in reference
SELECT ?heuristic ?heuristicLabel ?count WHERE {
  {
    SELECT ?heuristic (COUNT(?item) AS ?count) WHERE { ?item pr:P887 ?heuristic. }
    GROUP BY ?heuristic
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count"):::projected v3("?heuristic"):::projected v2("?item") c3(["bd:serviceParam"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"pr:P887"--> v3 bind1[/"count(?item)"/] v2 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end