query-f0cf91262e20f6d96ae3bfdcf4b55098
TODO
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 ?item ?itemLabel ?office ?officeLabel WHERE
{
?item wdt:P131 wd:Q59133 .
optional {?item wdt:P1313 ?office . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by desc(?officeLabel)
Query found at
- https://www.wikidata.org/wiki/User:Xaris333/query
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?office"):::projected
v1("?officeLabel"):::projected
c2(["wd:Q59133"]):::iri
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P131"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P1313".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end