query-45b8d7ec8367c715dbb04342b747562d

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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (year(?incept) as ?start) ?time_precision ?older_than_Notre_Dame WHERE {
  ?item wdt:P31/wdt:P279* wd:Q2977.
  ?item wdt:P17 wd:Q142.        
  ?item p:P571 [ ps:P571 ?incept; psv:P571 [ wikibase:timePrecision ?time_precision ]].
  filter (year(?incept)<1163)
  BIND(IF(?time_precision>=9|| year(?incept)<1100,'definitely','maybe') AS ?older_than_Notre_Dame)
  SERVICE wikibase:label {bd:serviceParam wikibase:language "en" . }         
} order by ?incept ?time_precision

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?incept"):::projected v3("?item"):::projected v4("?older_than_Notre_Dame"):::projected v5("?start") v2("?time_precision"):::projected a1((" ")) a2((" ")) a3((" ")) c4(["wd:Q2977"]):::iri c14(["en"]):::literal c12(["bd:serviceParam"]):::iri c6(["wd:Q142"]):::iri f0[["year-from-dateTime(?incept) < '1163^^xsd:integer'"]] f0 --> v1 v3 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c4 v3 --"p:direct/P17"--> c6 a2 --"p:statement/P571"--> v1 a3 --"wikibase:timePrecision"--> v2 a2 --"p:statement/value/P571"--> a3 v3 --"p:P571"--> a2 bind1[/"if((?time_precision >= '9^^xsd:integer' || year-from-dateTime(?incept) < '1100^^xsd:integer'),'definitely','maybe')"/] v2 --o bind1 v1 --o bind1 bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind2[/"year-from-dateTime(?incept)"/] v1 --o bind2 bind2 --as--o v5