query-27ab3063c164a3b237ea119eeed5eae5

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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?person ?personLabel ?dod WHERE
{
   {
  SELECT DISTINCT ?item ?person ?dod WHERE {
  ?person wdt:P570 ?dod .
  BIND(xsd:dateTime(?dod + "P96Y"^^xsd:duration) as ?date)
  BIND(xsd:dateTime(concat(str(year(now())),"-01-01T00:00:00Z")) as ?now) 
  BIND(xsd:dateTime(concat(str(year(now()+"P1Y"^^xsd:duration)),"-01-01T00:00:00Z")) as ?then) 
  FILTER( ?date >= ?now && ?date < ?then )
  ?item wdt:P50 ?person .
    }  }  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?date") v5("?dod"):::projected v6("?item"):::projected v6("?now") v4("?person"):::projected v6("?then") c4(["bd:serviceParam"]):::iri c6(["en"]):::literal f0[["?date >= ?now?date < ?then"]] f0 --> v6 f0 --> v6 f0 --> v6 v4 --"wdt:P570"--> v5 bind1[/"http://www.w3.org/2001/XMLSchema#dateTime(?dod + 'P96Y^^xsd:duration')"/] v5 --o bind1 bind1 --as--o v6 bind2[/"http://www.w3.org/2001/XMLSchema#dateTime(concat(str(year-from-dateTime(NOW())),'-01-01T00:00:00Z'))"/] bind2 --as--o v6 bind3[/"http://www.w3.org/2001/XMLSchema#dateTime(concat(str(year-from-dateTime(NOW() + 'P1Y^^xsd:duration')),'-01-01T00:00:00Z'))"/] bind3 --as--o v6 v6 --"wdt:P50"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end