query-4055db2071ceae5a31e8ab8c43b04cef

rq turtle/ttl

Find a person by matching a date SELECT DISTINCT ?person ?personLabel ?timeDeath ?threeID { # set the relevant date BIND ("1816-02-16"^^xsd:dateTime AS ?timeDeath) .

# human instead of fictional ?person wdt:P31 wd:Q5 .

# match the date of death ?person wdt:P570 ?timeDeath .

optional { # Three Decks ID ?person wdt:P7389 ?threeID . }

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?timeDeath

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#>
# Find a person by matching a date
SELECT DISTINCT ?person ?personLabel ?timeDeath ?threeID
{ 
  # set the relevant date
  BIND ("1816-02-16"^^xsd:date AS ?timeDeath) .

  # human instead of fictional
  ?person wdt:P31 wd:Q5 .

  # match the date of death
  ?person wdt:P570 ?timeDeath .

  optional {
    # Three Decks ID
    ?person wdt:P7389 ?threeID .
  }

  SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .} .

} ORDER BY ?timeDeath

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?person"):::projected v3("?threeID"):::projected v2("?timeDeath"):::projected c6(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c8(["en"]):::literal bind0[/"'1816-02-16^^xsd:date'"/] bind0 --as--o v2 v2 --"wdt:P31"--> c2 v2 --"wdt:P570"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P7389".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end