query-5988288a24fa4cd2941640c5a434121b
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?admin ?adminLabel ?start ?end WHERE {
VALUES ?admin { wd:Q16287 wd:Q18288162 }
?item p:P131 ?stat.
?stat ps:P131 ?admin.
OPTIONAL { ?stat pq:P580 ?start. }
OPTIONAL { ?stat pq:P582 ?end. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?admin"):::projected
v5("?end"):::projected
v2("?item"):::projected
v4("?start"):::projected
v3("?stat")
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
bind0[/VALUES ?admin/]
bind0-->v1
bind00(["wd:Q16287"])
bind00 --> bind0
bind01(["wd:Q18288162"])
bind01 --> bind0
v2 --"p:P131"--> v3
v3 --"p:statement/P131"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end