query-8a004ed337b32a5585e575c37ab65462

rq turtle/ttl

SPARQL query

Use at

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 ?item ?group ?district ?start ?end WHERE { ?item p:P39 ?ps . ?ps ps:P39 wd:Q1939555 ; pq:P2937 wd:Q30579723 . OPTIONAL { ?ps pq:P580 ?start } OPTIONAL { ?ps pq:P582 ?end } OPTIONAL { ?ps pq:P4100 ?group } OPTIONAL { ?ps pq:P768 ?district } }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?district"):::projected v4("?end"):::projected v5("?group"):::projected v1("?item"):::projected v2("?ps") v3("?start"):::projected c3(["wd:Q1939555"]):::iri c5(["wd:Q30579723"]):::iri v1 --"p:P39"--> v2 v2 --"p:statement/P39"--> c3 v2 --"p:qualifier/P2937"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P580".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P582".-> 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/P768".-> v6 end