query-8ebd76d118127a0b608da232af86c36a

rq turtle/ttl

14:02, 7 January 2018 (UTC) (contribs) (talk) Robin van der VlietThanks for the help. :, here it is:Robin van der Vliet@

Use at

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/>
SELECT ?item ?start ?end WHERE {
  ?item wdt:P463 wd:Q202479 ; wdt:P31 wd:Q5.
  OPTIONAL { ?item p:P463 [ ps:P463 wd:Q202479 ; pq:P580 ?start ] . }
  OPTIONAL { ?item p:P463 [ ps:P463 wd:Q202479 ; pq:P582 ?end ] . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?end"):::projected v1("?item"):::projected v2("?start"):::projected a1((" ")) a2((" ")) c4(["wd:Q5"]):::iri c2(["wd:Q202479"]):::iri v1 --"p:direct/P463"--> c2 v1 --"p:direct/P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a1 -."p:statement/P463".-> c2 a1 --"p:qualifier/P580"--> v2 v1 --"p:P463"--> a1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:statement/P463".-> c2 a2 --"p:qualifier/P582"--> v3 v1 --"p:P463"--> a2 end