query-d8460babd89d33f0bb914c0de00574ea
SPARQL query
Use at
- https://query.wikidata.org/sparql
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/>
SELECT DISTINCT ?wikidata ?wikidata_election ?wikidata_term ?wikidata_area ?wikidata_group WHERE {
?wikidata p:P39 ?statement .
?statement ps:P39 wd:Q21030356 ;
pq:P4100 wd:Q2465035 .
OPTIONAL { ?statement pq:P2715 ?wikidata_election }
OPTIONAL { ?statement pq:P768 ?wikidata_area }
OPTIONAL { ?statement pq:P4100 ?wikidata_group }
OPTIONAL { ?statement pq:P2937 ?wikidata_term }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?statement")
v1("?wikidata"):::projected
v4("?wikidata_area"):::projected
v3("?wikidata_election"):::projected
v5("?wikidata_group"):::projected
v6("?wikidata_term"):::projected
c3(["wd:Q21030356"]):::iri
c5(["wd:Q2465035"]):::iri
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> c3
v2 --"p:qualifier/P4100"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P2715".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P768".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P4100".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P2937".-> v6
end