query-14de883e5ab58de940aef91a451c55da
members of the 2010-15 Parliament. SELECT DISTINCT ?item ?itemLabel ?constituencyLabel ?partyLabel ?start ?electionLabel ?end ?causeLabel { ?item p:P39 ?positionStatement . ?positionStatement ps:P39 wd:Q35494253 . OPTIONAL { ?positionStatement pq:P768 ?constituency . } OPTIONAL { ?positionStatement pq:P4100 ?party . } OPTIONAL { ?positionStatement pq:P580 ?start . } OPTIONAL { ?positionStatement pq:P2715 ?election . } OPTIONAL { ?positionStatement pq:P582 ?end . } OPTIONAL { ?positionStatement pq:P1534 ?cause . } SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' } } ORDER BY ?start
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#>
# members of the 2010-15 Parliament.
SELECT DISTINCT ?item ?itemLabel ?constituencyLabel ?partyLabel ?start ?electionLabel ?end ?causeLabel {
?item p:P39 ?positionStatement .
?positionStatement ps:P39 wd:Q35494253 .
OPTIONAL { ?positionStatement pq:P768 ?constituency . }
OPTIONAL { ?positionStatement pq:P4100 ?party . }
OPTIONAL { ?positionStatement pq:P580 ?start . }
OPTIONAL { ?positionStatement pq:P2715 ?election . }
OPTIONAL { ?positionStatement pq:P582 ?end . }
OPTIONAL { ?positionStatement pq:P1534 ?cause . }
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;
v8("?cause")
v4("?constituency")
v6("?election")
v7("?end"):::projected
v2("?item"):::projected
v5("?party")
v3("?positionStatement")
v1("?start"):::projected
c13(["en"]):::literal
c11(["bd:serviceParam"]):::iri
c3(["wd:Q35494253"]):::iri
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P768".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P4100".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v1
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P2715".-> v6
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v7
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P1534".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end