query-572c9d03ceb805d24d6746d888702d8d

rq turtle/ttl

SPARQL query

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?id ?holder_id WHERE {
   ?id wdt:P31 wd:Q6256 .
   OPTIONAL {
     ?id wdt:P1313 ?office .
     OPTIONAL { ?office wdt:P1308 ?holder_id . }
   }
 }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?holder_id"):::projected v1("?id"):::projected v2("?office") c2(["wd:Q6256"]):::iri v1 --"wdt:P31"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1313".-> v2 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1308".-> v3 end end