query-168707192b70b098e6ea9708119aed27

rq turtle/ttl

Propertiesplace of birth (P19)located in the administrative territorial entity (P131)shares border with (P47)conflict (P607)coordinate location (P625)image (P18)date of birth (P569)date of death (P570)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?name (CONCAT("Born ",str(?born), ", ",?birthplace,"; Died ", str(?died)) as ?dates) ?article WHERE {
   ?person wdt:P19 ?place . # place of birth
   {?place wdt:P131* wd:Q23165 } UNION { ?place wdt:P131* ?county. ?county wdt:P47 wd:Q23165 }. # born in Oxfordshire or adjacent county 
   ?person wdt:P607 wd:Q361 . # involved in World War I
    # ?place wdt:P625 ?coord . # lat and long of birthplace
     MINUS { ?person wdt:P18 ?image }. #image
      ?person wdt:P569 ?dob . #date of birth
    BIND(YEAR(?dob) as ?born).
    OPTIONAL { ?person wdt:P570 ?dod }. #date of death
  BIND(YEAR(?dod) as ?died).
   ?person rdfs:label ?name filter (lang(?name) = "en")
   ?place rdfs:label ?birthplace filter (lang(?birthplace) = "en")
OPTIONAL{ ?article schema:about ?person. ?article schema:isPartOf <https://en.wikipedia.org/>.  }
} ORDER by ?birthplace

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?article"):::projected v1("?birthplace"):::projected v8("?born"):::projected v5("?county") v12("?dates") v10("?died"):::projected v7("?dob") v9("?dod") v6("?image") v2("?name"):::projected v3("?person") v4("?place") c4(["wd:Q23165"]):::iri c14([https://en.wikipedia.org/]):::iri c7(["wd:Q361"]):::iri f0[["?birthplace = 'en'"]] f0 --> v1 f1[["?name = 'en'"]] f1 --> v2 v3 --"wdt:P19"--> v4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P131"--> v5 v5 --"wdt:P47"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P131"--> c4 end union0r <== or ==> union0l end v3 --"wdt:P607"--> c7 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P18"--> v6 end v3 --"wdt:P569"--> v7 bind3[/"year-from-dateTime(?dob)"/] v7 --o bind3 bind3 --as--o v8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P570".-> v9 end bind4[/"year-from-dateTime(?dod)"/] v9 --o bind4 bind4 --as--o v10 v3 --"rdfs:label"--> v2 v4 --"rdfs:label"--> v1 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v11 -."schema:about".-> v3 v11 --"schema:isPartOf"--> c14 end bind5[/"concat('Born ',str(?born),', ',?birthplace,'; Died ',str(?died))"/] v8 --o bind5 v1 --o bind5 v10 --o bind5 bind5 --as--o v12