query-ea464b8bc07dff826f42c3f1a9736462

rq turtle/ttl

TODO

Use at

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 
WHERE 
{
  ?item wdt:P31 wd:Q5
  {?item wdt:P27 wd:Q20.}  #citizen of Norway
  UNION                    #or  
  {?item wdt:P27 wd:Q189.} #citizen of Iceland

  {?item wdt:P569 ?dob. filter(year(?dob)>793) filter(year(?dob)<1066)}
  union
  {?item wdt:P570 ?dod. filter(year(?dod)>793) filter(year(?dod)<1066)}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?dob") v3("?dod") v1("?item"):::projected c4(["wd:Q20"]):::iri c11(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q189"]):::iri v1 --"wdt:P31"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P27"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P27"--> c4 end union0r <== or ==> union0l end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; f0[["year-from-dateTime(?dod) < '1066^^xsd:integer'"]] f0 --> v3 f1[["year-from-dateTime(?dod) > '793^^xsd:integer'"]] f1 --> v3 v1 --"wdt:P570"--> v3 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; f2[["year-from-dateTime(?dob) < '1066^^xsd:integer'"]] f2 --> v2 f3[["year-from-dateTime(?dob) > '793^^xsd:integer'"]] f3 --> v2 v1 --"wdt:P569"--> v2 end union1r <== or ==> union1l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end