query-38f452543f70934aa6eca13d529f83ed
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 schema: <http://schema.org/>
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 ?item ?itemLabel ?constituency ?constituencyLabel ?constituencyDescription ?sitelink ?article {
VALUES ?constituency {wd:Q60576091 wd:Q3335749 wd:Q5179039 wd:Q3335775 wd:Q1075422 wd:Q5179085
wd:Q56185582 wd:Q5179125 wd:Q5179113 wd:Q5179104 wd:Q5179114 wd:Q42967186 }
?item p:P39 ?positionStatement .
?positionStatement pq:P768 ?constituency .
?positionStatement ps:P39 [wdt:P279* wd:Q486839] .
OPTIONAL { ?article schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> ;
schema:name ?sitelink .}
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;
v4("?article"):::projected
v1("?constituency"):::projected
v2("?item"):::projected
v3("?positionStatement")
v5("?sitelink"):::projected
a1((" "))
c13(["en"]):::literal
c4(["wd:Q486839"]):::iri
c8([https://en.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
bind0[/VALUES ?constituency/]
bind0-->v1
bind00(["wd:Q60576091"])
bind00 --> bind0
bind01(["wd:Q3335749"])
bind01 --> bind0
bind02(["wd:Q5179039"])
bind02 --> bind0
bind03(["wd:Q3335775"])
bind03 --> bind0
bind04(["wd:Q1075422"])
bind04 --> bind0
bind05(["wd:Q5179085"])
bind05 --> bind0
bind06(["wd:Q56185582"])
bind06 --> bind0
bind07(["wd:Q5179125"])
bind07 --> bind0
bind08(["wd:Q5179113"])
bind08 --> bind0
bind09(["wd:Q5179104"])
bind09 --> bind0
bind010(["wd:Q5179114"])
bind010 --> bind0
bind011(["wd:Q42967186"])
bind011 --> bind0
v2 --"p:P39"--> v3
v3 --"p:qualifier/P768"--> v1
a1 --"p:direct/P279"--> c4
v3 --"p:statement/P39"--> a1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v2
v4 --"schema:isPartOf"--> c8
v4 --"schema:name"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end