query-2cc0e2b668384bf05caa2a8b28310e16
Labels for scholarly articlesI took my very simplest query to try to get my head round federated queries. I am looking simply for the count of different types of thesis at an institution. I'm not getting the labels for the type of thesis, even though I think those labels must be in the scholarly subgraph, what am I doing wrong?
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?thesisType ?thesisTypeLabel (COUNT(?thesisType) AS ?count) WHERE {
?thesis wdt:P4101 wd:Q1048626;
wdt:P31 ?thesisType.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?thesisType ?thesisTypeLabel
ORDER BY DESC (?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?count")
v2("?thesis")
v3("?thesisType"):::projected
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q1048626"]):::iri
v2 --"wdt:P4101"--> c2
v2 --"wdt:P31"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind1[/"count(?thesisType)"/]
v3 --o bind1
bind1 --as--o v4