query-8b430a716ca78385ff1a5b63e5cd74fd
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 {
?constituency wdt:P1365* wd:Q60576091 .
?item p:P39 ?positionStatement .
?positionStatement pq:P768 ?constituency .
?positionStatement ps:P39 ?position.
?position 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;
v5("?article"):::projected
v1("?constituency"):::projected
v2("?item"):::projected
v4("?position")
v3("?positionStatement")
v6("?sitelink"):::projected
c2(["wd:Q60576091"]):::iri
c15(["en"]):::literal
c7(["wd:Q486839"]):::iri
c10([https://en.wikipedia.org/]):::iri
c13(["bd:serviceParam"]):::iri
v1 --"p:direct/P1365"--> c2
v2 --"p:P39"--> v3
v3 --"p:qualifier/P768"--> v1
v3 --"p:statement/P39"--> v4
v4 --"p:direct/P279"--> c7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."schema:about".-> v2
v5 --"schema:isPartOf"--> c10
v5 --"schema:name"--> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end