query-670db464906540d46a3166e4b48725f0

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?surnameLabel ?dob ?oxford_collegeLabel
WHERE
{
  { ?item wdt:P69 wd:Q34433 . }
  UNION { ?item wdt:P69 ?oxford_college .
    ?oxford_college wdt:P31 wd:Q2581649 . }
  ?item wdt:P31 wd:Q5 .
  ?item wdt:P734 ?surname .
  ?item wdt:P569 ?dob . 
  FILTER("1694-00-00T00:00:00Z"^^xsd:dateTime <= ?dob && ?dob < "1868-00-00T00:00:00Z"^^xsd:dateTime)
  FILTER NOT EXISTS { ?item wdt:P1343 wd:Q19036877 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?surnameLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?dob"):::projected v2("?item"):::projected v4("?oxford_college") v5("?surname") v1("?surnameLabel"):::projected c2(["wd:Q19036877"]):::iri c13(["bd:serviceParam"]):::iri c9(["wd:Q5"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q34433"]):::iri c8(["wd:Q2581649"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P1343"--> e0c2 e0v1("?item"):::projected e0c2(["wd:Q19036877"]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> c2 v2 --"wdt:P1343"--> c2 f1[["'1694-00-00T00:00:00Z^^xsd:dateTime' <= ?dob?dob < '1868-00-00T00:00:00Z^^xsd:dateTime'"]] f1 --> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P69"--> v4 v4 --"wdt:P31"--> c8 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P69"--> c6 end union0r <== or ==> union0l end v2 --"wdt:P31"--> c9 v2 --"wdt:P734"--> v5 v2 --"wdt:P569"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end