query-3eda1090c0e90bd589fec893afdf8440
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 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 ?Depute ?DeputeLabel ?LegislatureLabel ?p580 ?p582 WHERE {
VALUES ?Legislature { wd:Q3570394 }
?Depute wdt:P31 wd:Q5.
?Depute p:P39 ?p39stm .
?p39stm ps:P39 wd:Q3044918.
?p39stm pq:P2937 ?Legislature .
OPTIONAL { ?p39stm pq:P580 ?p580 }
OPTIONAL { ?p39stm pq:P582 ?p582 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?DeputeLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?Depute"):::projected
v1("?DeputeLabel"):::projected
v2("?Legislature")
v4("?p39stm")
v5("?p580"):::projected
v6("?p582"):::projected
c10(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c5(["wd:Q3044918"]):::iri
c12(["en"]):::literal
bind0[/VALUES ?Legislature/]
bind0-->v2
bind00(["wd:Q3570394"])
bind00 --> bind0
v3 --"p:direct/P31"--> c2
v3 --"p:P39"--> v4
v4 --"p:statement/P39"--> c5
v4 --"p:qualifier/P2937"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P580".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P582".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end