query-2bf79bffe9b6bc5dcfcb69a2d28bf5e1

rq turtle/ttl

PropertiesEarly Modern Letters Online person ID (P1802)date of birth (P569)date of death (P570)place of birth (P19)place of death (P20)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?person ?personLabel (URI(CONCAT("http://emlo.bodleian.ox.ac.uk/profile/person/",?emlo)) AS ?emlolink) ?birthyear (IF(isBLANK(?pob),"unknown",?pobLabel) AS ?birthplace) ?deathyear (IF(isBLANK(?pod),"unknown",?podLabel) AS ?deathplace)
WHERE {
   ?person wdt:P1802 ?emlo;
 OPTIONAL { ?person wdt:P569 ?dob }
 OPTIONAL { ?person wdt:P570 ?dod }
 OPTIONAL { ?person wdt:P19 ?pob }
 OPTIONAL { ?person wdt:P20 ?pod }
BIND(YEAR(?dob) as ?birthyear)
BIND(YEAR(?dod) as ?deathyear)
  SERVICE wikibase:label { 
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,de,nl,es,pl".
  ?pob rdfs:label ?pobLabel.
  ?pod rdfs:label ?podLabel.
  ?person rdfs:label ?personLabel
  }
} ORDER BY DESC(?birthyear)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v13("?birthplace") v8("?birthyear"):::projected v14("?deathplace") v8("?deathyear"):::projected v4("?dob") v5("?dod") v3("?emlo"):::projected v12("?emlolink") v2("?person"):::projected v11("?personLabel"):::projected v6("?pob"):::projected v9("?pobLabel"):::projected v7("?pod"):::projected v10("?podLabel"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en,fr,de,nl,es,pl"]):::literal v2 --"wdt:P1802"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P20".-> v7 end bind0[/"year-from-dateTime(?dob)"/] v4 --o bind0 bind0 --as--o v8 bind1[/"year-from-dateTime(?dod)"/] v5 --o bind1 bind1 --as--o v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v6 --"rdfs:label"--> v9 v7 --"rdfs:label"--> v10 v2 --"rdfs:label"--> v11 end bind2[/"concat('http://emlo.bodleian.ox.ac.uk/profile/person/',?emlo)"/] v3 --o bind2 bind2 --as--o v12 bind3[/"if(isBlank(?pob),'unknown',?pobLabel)"/] v6 --o bind3 v9 --o bind3 bind3 --as--o v13 bind4[/"if(isBlank(?pod),'unknown',?podLabel)"/] v7 --o bind4 v10 --o bind4 bind4 --as--o v14