query-37656a69b724c87263621ffbb1971fa5

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#>
#Riemann
#defaultView:Timeline
SELECT DISTINCT ?t ?value ?rrLabel ?valueLabel ?image
WHERE
{
  {wd:Q42299 ?prop ?t FILTER (datatype(?t)=xsd:dateTime) .
   ?value wikibase:directClaim ?prop. }
  UNION
  {
   wd:Q42299 ?q ?statement  FILTER regex (STR(?q),"prop/P") . #exclude P:describedBy
   wd:Q42299 wdt:P570 ?death . 
   ?statement ?p ?t FILTER regex (STR(?p), "prop/qualifier/P") FILTER (datatype(?t)=xsd:dateTime) FILTER (?t < ?death).
   ?statement ?r ?value FILTER regex (STR(?r),"prop/statement/") .
   BIND(IRI(CONCAT(CONCAT(SUBSTR(STR(?r),1,29),"direct/"),SUBSTR(STR(?r),40))) as ?rprop) 
   ?rr wikibase:directClaim ?rprop .
   OPTIONAL {?value wdt:P18 ?image}
  }
  UNION {
   ?value wdt:P50 wd:Q42299 .
#   wd:Q309765 wdt:P570 ?death .
   ?value wdt:P577 ?t . 
#          FILTER (?t < ?death) 
#    FILTER NOT EXISTS {?value wdt:P629 ?x .} .
#   ?value wdt:P1433 ?rr .
   OPTIONAL {?value wdt:P18 ?image}
  }
  UNION
  {
   wd:Q42299 wdt:P800 ?rr .
   ?rr  wdt:P577 ?t .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de, fr". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?death") v11("?image"):::projected v6("?p") v2("?prop") v7("?q") v4("?r") v9("?rprop") v10("?rr") v8("?statement") v1("?t"):::projected v3("?value"):::projected c2(["wd:Q42299"]):::iri c13(["bd:serviceParam"]):::iri c15(["en,de, fr"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; c2 --"wdt:P800"--> v10 v10 --"wdt:P577"--> v1 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P50"--> c2 v3 --"wdt:P577"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v11 end end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; f0[["regex(str(?r),'prop/statement/')"]] f0 --> v4 f1[["?t < ?death"]] f1 --> v1 f1 --> v5 f2[["?t = 'xsd:dateTime'"]] f2 --> v1 f3[["regex(str(?p),'prop/qualifier/P')"]] f3 --> v6 f4[["regex(str(?q),'prop/P')"]] f4 --> v7 c2 -->v7--> v8 c2 --"wdt:P570"--> v5 v8 -->v6--> v1 v8 -->v4--> v3 bind5[/"concat(concat(substring(str(?r),'1^^xsd:integer','29^^xsd:integer'),'direct/'),substring(str(?r),'40^^xsd:integer'))"/] v4 --o bind5 bind5 --as--o v9 v10 --"wikibase:directClaim"--> v9 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v11 end end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f6[["?t = 'xsd:dateTime'"]] f6 --> v1 c2 -->v2--> v1 v3 --"wikibase:directClaim"--> v2 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end