query-208a056fa096359778073ed62928b14e
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?cap
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
mwapi:srsearch "Grade".
?item wikibase:apiOutputItem mwapi:title .
}
?item rdfs:label ?itemLabel.
BIND(IF(str(?itemLabel) ="grade","lower",IF(str(?itemLabel) ="Grade","upper","")) as ?cap)
FILTER (lcase(str(?itemLabel)) ="grade")
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?cap"):::projected
v2("?item"):::projected
v1("?itemLabel"):::projected
c7(["www.wikidata.org"]):::literal
c3(["bd:serviceParam"]):::iri
c5(["Search"]):::literal
c9(["Grade"]):::literal
c11(["mwapi:title"]):::iri
f0[["lower-case(str(?itemLabel)) = 'grade'"]]
f0 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c3 --"mwapi:api"--> c5
c3 --"mwapi:endpoint"--> c7
c3 --"mwapi:srsearch"--> c9
v2 --"mwapi:apiOutputItem"--> c11
end
v2 --"rdfs:label"--> v1
bind1[/"if(str(?itemLabel) = 'grade','lower',if(str(?itemLabel) = 'Grade','upper',''))"/]
v1 --o bind1
bind1 --as--o v3