query-73594c6c57bec9dc33e5dad863c2526e
ConstituenciesList of all constituencies which have been represented by any known MP
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 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 DISTINCT ?constituencyLabel ?typeLabel ?start ?end ?partofLabel {
?item p:P39 ?positionStatement .
?positionStatement ps:P39 [ wdt:P279 wd:Q16707842 ] .
?positionStatement pq:P768 ?constituency .
OPTIONAL { ?constituency wdt:P31 ?type .}
OPTIONAL { ?constituency wdt:P571 ?start .}
OPTIONAL { ?constituency wdt:P576 ?end .}
OPTIONAL { ?constituency wdt:P131 ?partof .}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?constituency")
v6("?end"):::projected
v2("?item")
v7("?partof")
v3("?positionStatement")
v1("?start"):::projected
v5("?type")
a1((" "))
c3(["wd:Q16707842"]):::iri
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
v2 --"p:P39"--> v3
a1 --"p:direct/P279"--> c3
v3 --"p:statement/P39"--> a1
v3 --"p:qualifier/P768"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P31".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P571".-> v1
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P576".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:direct/P131".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end